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

Updates for prohibited attributes for elements with implicit role of generic #40280

Open
cmorten opened this issue May 29, 2023 · 1 comment
Open
Assignees
Labels

Comments

@cmorten
Copy link

cmorten commented May 29, 2023

Raising this issue to track updates to relevant "aria group" tests to remove use of prohibited states and properties on elements that have an implicit role of generic, e.g. <div>, <span>, and other elements. This may be a little premature depending on what W3C spec status is being tracked by WPT for each of the relevant specs.

WAI-ARIA 1.2 introduced the generic role and has been assigned to several elements such as <div>. The generic role has a number of prohibited properties and states:

  • aria-label
  • aria-labelledby
  • aria-roledescription

See https://www.w3.org/TR/wai-aria-1.2/#generic.

There are a number of tests that use the <div> element (historically had no corresponding role and a natural go to) which are now invalid under the proposed recommendation WAI-ARIA 1.2 as they use one or more of the above prohibited properties or states.

For example see the following accname tests which use a <div> element with prohibited properties or states:

I expect the set of impacting tests to include, but not be limited to, the above set of tests.

R.E. whether this is an appropriate time to update such tests, in the html-aam tests the roles test has already been updated to assert <div>, <span>, and other elements have a role of generic, see https://github.com/web-platform-tests/wpt/blob/master/html-aam/roles.html#L58. The core-aam tests also now include one assertion verifying the prohibited aria-roledescription attribute on elements with generic role, see https://github.com/web-platform-tests/wpt/blob/master/core-aam/generic_roledescription_prohibited-manual.html#L64.

One path forward would be to swap the use of <div> with a new, different element that has no corresponding role under WAI-ARIA, but given these changes, it may not be particularly future-proof to churn as I get the impression more of these elements with no corresponding role currently may likely gain an assigned implicit role in future versions of the spec. Some thought needed as to the appropriate replacement element, or if there are other paths forward perhaps?

@cmorten
Copy link
Author

cmorten commented Jun 14, 2023

Relates somewhat to web-platform-tests/interop-accessibility#48 like discussion

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

No branches or pull requests

3 participants