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

Conditional reveal aria-controls attribute added with JS #685

Closed
adamsilver opened this issue May 10, 2018 · 3 comments
Closed

Conditional reveal aria-controls attribute added with JS #685

adamsilver opened this issue May 10, 2018 · 3 comments
Labels
accessibility feature request User requests a new feature 🕔 hours A well understood issue which we expect to take less than a day to resolve.

Comments

@adamsilver
Copy link
Contributor

adamsilver commented May 10, 2018

Currently, the aria-controls attribute is added during JS initialisation.

My thinking is that the attribute should be in the HTML regardless.

This way when a screen reader user focuses the radio button (or checkbox) they will be able to move to the controlled panel using additional shortcuts.

@NickColley NickColley added feature request User requests a new feature accessibility labels Jul 17, 2018
@kr8n3r
Copy link

kr8n3r commented Jul 20, 2018

related: https://developer.paciellogroup.com/blog/2018/06/short-note-on-progressive-aria/

But when ARIA is hard-coded into HTML it can have unintended consequences if/when the JavaScript fails to deliver the expected functionality.

@joshueoconnor
Copy link

joshueoconnor commented Dec 3, 2018

+1 to @adamsilver

Actually AFAIK, the use of these kinds of ARIA attributes/properties is not JavaScript dependent at all but on support within the user agent (whether browser or AT). The points that Leonie makes on the blog post above are where JS is used as the delivery mechanism for 'some useful ARIA thing that makes something more accessible' - which is of course, important.

@timpaul timpaul added 🕔 hours A well understood issue which we expect to take less than a day to resolve. Priority: low labels May 20, 2019
@NickColley
Copy link
Contributor

NickColley commented Feb 25, 2020

https://www.w3.org/WAI/PF/aria-1.1/states_and_properties#aria-controls

Identifies the element (or elements) whose contents or presence are controlled by the current element.

We use aria-controls on these elements to enhance aria-expanded, which is not an allowed attribute for checkboxes and radio buttons.

So I think really it's perhaps a bit of a stretch to use aria-controls in a scenario where the content is static.

For pragmatic reasons adding this the to markup when we're considering removing aria-controls and aria-expanded would mean we'd have to make a breaking change in the future.

Finally, assistive technologies have limited support for this attribute when used on these elements.

So with all this in mind I'll close this out for now but if something changes and we do not decide to remove these attributes then we can reconsider this.

Thank you for raising. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility feature request User requests a new feature 🕔 hours A well understood issue which we expect to take less than a day to resolve.
Projects
None yet
Development

No branches or pull requests

6 participants