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

Recommendation of aria-controls for the aria-expanded attribute #1376

Closed
Wildebrew opened this issue Dec 20, 2020 · 3 comments
Closed

Recommendation of aria-controls for the aria-expanded attribute #1376

Wildebrew opened this issue Dec 20, 2020 · 3 comments

Comments

@Wildebrew
Copy link

The ARIA 1.2 definition of aria-expanded contains the following recommendation "If a grouping container that can be expanded or collapsed is not owned by the element that has the aria-expanded attribute, the author SHOULD identify the controlling relationship by referencing the container from the element that has aria-expanded with the aria-controls property.".
I find this a bit odd. A grouping element should never be owned by a control (e.g. a button or a checkbox) so this is barely ever the case. Maybe for gridcells or treeitems, but other than that this is rare.
This basically recommends use of aria-controls on all controls that have aria-expanded. Given the lack of support for the attribute, often coupled with unnecessary verbosity, using aria-controls can make for a worse user experience.
I would drop recommendation for use of aria-controls if

  • The grouping element whose display is controlled by the element with aria-controls is a sibling of the control element and if the grouping element immedaitely follows the control in content order.
  • Therefore a button with aria-expanded followed by the content whose display is controlled by activating the button does not need aria-controls, while a button that controls content elsewhere on the page does need it.
  • I admit this is not a high priority issue, but I have recommended against use of aria-controls except where the content controlled by an element is not immediately adjacent to it.
@JAWS-test
Copy link
Contributor

See: #995

@mcking65
Copy link
Contributor

mcking65 commented Jan 3, 2021

@Wildebrew
Birkir, Could you please add your thoughts to #995 so we can have a single thread on this topic?

@jnurthen
Copy link
Member

jnurthen commented Jan 7, 2021

Closing as a duplicate of #995 - please add the text if not covered

@jnurthen jnurthen closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants