Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect use of <label for=FORM_ELEMENT> #7981

Open
1 of 7 tasks
johnriedel opened this issue Jan 13, 2025 · 2 comments · May be fixed by #7982
Open
1 of 7 tasks

Incorrect use of <label for=FORM_ELEMENT> #7981

johnriedel opened this issue Jan 13, 2025 · 2 comments · May be fixed by #7982
Labels

Comments

@johnriedel
Copy link
Contributor

Summary

Every form row created via the Forms API is given a label element with a "for" attribute (src/api/forms/components/FormRow.vue:25). However, this attribute is ineffective since the form controls created via the FormController don't implement a matching ID. This causes the following error:

Image

Expected vs Current Behavior

The expected behavior when the "for" attribute is used in a label element is to bring focus to the associated form control when the label is clicked.

Actual behavior: nothing happens when the label is clicked.

Steps to Reproduce

  1. Click "+Create" in the upper left corner.
  2. Click "Clock"
  3. Click on the "Notes" label
  4. Notice the focus isn't put on the textarea field. This is because the ID specified in the label's "for" attribute differs from the form control's ID.

Environment

  • Open MCT Version: 4.1.0-next
  • Deployment Type:
  • OS:
  • Browser:

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@johnriedel
Copy link
Contributor Author

Code update complete. Opening PR shortly......

@johnriedel
Copy link
Contributor Author

Associated PR: #7982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant