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

Revise allowed roles for label element #492

Open
scottaohara opened this issue Oct 26, 2023 · 0 comments
Open

Revise allowed roles for label element #492

scottaohara opened this issue Oct 26, 2023 · 0 comments
Labels
Allowed aria-* attributes Allowed roles Pertaining to the allowed roles of HTML elements

Comments

@scottaohara
Copy link
Member

the rules around what roles are allowed on label should better refelct when adjusting the role will cause an accessibility issue.

there are really 3 differnet use cases:

  1. label is associated with a form element via its for attribute
  2. label is associated with a form element by being its ancestor
  3. label is not associated with a form element

For 1 & 2, there can be accName breakages if the role is changed - and for 2 specifically there can be potential invalid nesting of role issues we would want to avoid

For 3.... someone decided to use label instead of span. For most cases, I'd submit there's not a whole lot that can go wrong here if someone were to modify the role so the element could be exposed as / behave as something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Allowed aria-* attributes Allowed roles Pertaining to the allowed roles of HTML elements
Projects
None yet
Development

No branches or pull requests

1 participant