-
Notifications
You must be signed in to change notification settings - Fork 125
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
What to do about aria-controls #995
Comments
More reading from other past |
Do we happen to know what "no longer say ... by default" means? Is it:
|
@joanmarie currently asking about that, will report back. |
re: mention in ARIA WG call today, JAWS does have this set to ignore by default now. |
I have been told that a menu button inside a scrollable table can have its menu clipped if the button and the menu are siblings (i.e. if the menu is inside the table). Here's an example: https://www.codeply.com/go/QnOrPZvtHt/bootstrap-dropdown-overlay-table-cell For this reason, the menu was moved to another part of the DOM (i.e. not inside the table) and As far as I know, using |
I agree with @scottaohara carmacleod that there is a use case to answer and that aria-controls is the only real solution, even if it seems to be disappearing from our grasp. Do we have any data on why it was never implemented in other screen readers? |
Hi, @LJWatson!
I found a request to support aria-controls navigation in NVDA, but there's no reply yet. Interestingly, the requester did mention some disadvantages to the JAWS implementation, namely:
There's also a bit of discussion about aria-controls in the 2 aria issues referenced above: #531 and #716, where @mcking65 said:
A lot of the time, the controlled element is right after the controlling element in the tab order and/or reading order, which, as @scottaohara noted, seems to be the reason given in the JAWS release notes for no longer announcing the navigation key by default:
This may partially explain why other AT didn't implement an aria-controls navigation key? |
I still believe there are valid use cases for aria-controls both for AT users and automated testing. And, the dearth of support in screen readers is partly a chicken and egg problem. I think the ARIA 1.3 time frame is right for attacking this given our other priorities. And, we are finally at a point in authoring practices where we can realistically help address the topic. I for one am happy for the change to JAWS. The announcement created a lot of noise with essentially 0 benefit. The reason there was 0 benefit was not because benefit was out of reach, it is because the JAWS implementation was not well designed. If the design was such that:
As it was, the announcement was extremely verbose. It was made even if there was no possibility of navigating to the target, i.e., the target was not visible. It used words like "controlled element", which are meaningless to typical users. It had a new, dedicated key command that required constant reminding. Even if you just solved the first three issues without taking on the massive key command bloat problem, it could have been much more successful. For instance, What if you just read or actived a tab named "Discussion" and then, if you have tutor messages turned on, you hear "Move to discussion panel with insert+alt+m". You should never hear this for a tab that controls a panel that is not visible. You should never hear words like "element" or "controls" as they are useless to the user. JAWS can know the type of element that is the target. JAWS can also know its name and visibility as well as its distance in the virtual buffer. |
I think at the least in the short term, in the aria-practices document, we can leave off aria-controls when the content that is being controlled immediately follows the controller. |
<I think at the least in the short term, in the aria-practices document,
we can leave off aria-controls when the content that is being controlled
immediately
follows the controller.>
I think this would establish an anti-pattern.
Would the absence of aria-controls mean there was no controlled content,
or that there is controlled content but it's next in the DOM order? The
user has no way to tell.
|
@DavidMacDonald wrote:
@LJWatson wrote:
I agree with Léonie. Assistive tech could use the aria-controls relation to determine where the controlled content is and decide what to do based on the location, visibility, the type of element controled, the name of the element, other properties and states it has, etc. As with all accessibility semantics, it is the responsibility of the AT developer to determine the ideal way to use the semantics to the advantage of their users and design their experiences accordingly. As with several other ARIA features, assistive technology developers have not yet made these investments. One of the goals of the w3c/aria-at project is to spur not just basic support for ARIA, but once that is in place, inspire greater value add. The aria-controls property is just one example of where there is ample room for that kind of improvement. Additionally, if you are leveraging ARIA in automated testing, like the regression tests built into the APG build process, a sometimes its there and sometimes its not approach wouldn't work. |
Oops, in wrong issue, sorry; deleting previous comment and re-opening. I meant to close the APG issue. |
Dropping my 2 cents in here simply because I just came across this issue on an app I'm testing and discovered this interesting read - aria-controls is poop. I discovered it when the app had a control with the aria-controls attribute that pointed to non-existant elements. |
i seem to vaguely remember that there can also be problems with if it has no actual real-world benefit, and other AT have been loathe to implement any useful behavior for it...it feels like it should be removed perhaps. it's certainly not something i would advise people use, because it's more of an empty gesture at this point. |
We recently went through a bunch of pain to put |
@craigkovatch wrote:
I recommend you keep it. |
Hi... I've just come across this discussion, having re-read Heydon Pickering's aria-controls is poop article. I'm in the process of re-working a whole bunch of out-dated and inaccessible UI components (dropdown menus, show/hide content toggles, tabs, accordions, etc) and was going to omit I'm intrigued about the comment.
Why? |
Because the ARIA working group will be discussing aria-controls to come up with recommendations (for AT and/or UA and/or authors) in the ARIA 1.3 time frame (i.e. "sometime this year" although global events causing meeting cancellations may delay this). |
Here's another kind of potential use case for
Other solutions have various problems.
|
In case it's useful to know for other reasons, note that aria-expanded is now allowed on checkbox as of May 2019:
|
Thanks @carmacleod. I've filed w3c/html-aria#251 to stay in sync. |
@scottaohara @mcking65 still in scope for 1.3? |
Need to talk to AT about expectations |
Hi all. Two years late, is there any update about the recommendation for |
resolves #995 The intent with this update is, 4 years later, to propose a draft solution for the issue I opened. With the progress made on aria-details, and the overlaps in how this attribute could have been useful, I did take great liberty in pulling in further explanation/examples for aria-controls from the existing aria-details spec text. Things i didn't overly call out in this pr, but should probably make their way in there concern recommendations on whether or not to expose the controlling relationship depending on DOM/a11y API relationship. E.g., we probably don't need an explicit user exposed controlling relationship if a controlled element is directly after the controlling element in the dom (e.g., a disclosure widget) but we _would_ want AT to know they could make this association clear if the elements were located in different portions of the a11y tree - e.g., a button opening a non-modal dialog that happens to be at the bottom of the DOM, but the button is somewhere else entirely.
## Summary: The Explanation widget should be consistent regardless of its content type, as well as across device platforms. Therefore, the `<Clickable>` element is now changed to a Wonder Blocks `<Button>`. Additionally, minor custom formatting that was tied to the content type (i.e. article) or the platform (i.e. mobile) has been removed. The widget should also follow accessibility best practices. The attribute `aria-controls` has been added to the button to indicate what will be affected when it is toggled. Although [this attribute is not currently being used](w3c/aria#995) by assistive technologies, it is [highly recommended by the ARIA working group](w3c/aria#995 (comment)) that this attribute be applied in cases such as this. Therefore, in addition to the attribute being added to the button, the content that is shown/hidden by the button is now rendered in the DOM at all times in order to be referenced by the `aria-controls` attribute. Interactions with the widget should respond in an intuitive manner. When activation of an element causes something else to happen on the page, an [animation can ease the cognitive aspects](https://www.nngroup.com/articles/animation-usability/) of following that change. Therefore, CSS transitions have been applied to properties of the content wrapper to change the show/hide action to be a reveal/conceal action (see the Before and After videos for a comparison). In order to honor the preferences of the user, the widget checks the `prefers-reduced-motion` media preference before applying the transitions. Other interesting changes: * Refactored the widget to take advantage of the common visuals across use cases. * Removed unneeded logic branches. * Removed unneeded styling. * Removed unneeded unit tests. * Moved styling logic outside of the JSX block. * Added a new Storybook story (with new test data) to show a normal use case. * Fixed unit tests for Graded Group widget which improperly referenced the Explanation widget. * Changed the test data to use the GG widget's internal Explain/Hide button. * Updated the snapshots. * Added UI regression tests to guard against CSS mishaps that alter keyboard interactions. Issues: LP-5838, LEMS-199, LEMS-259, LP-11557 (possibly), LEMS-277, LC-212, MOB-5434 (possibly) ## Test plan: 1. Open the Perseus Storybook (locally: http://localhost:6006/?path=/story/perseus-widgets-explanation--question-1). * Notice the change in appearance of the "Explanation" button. 1. Activate the "Explanation" button (either by clicking it or by tabbing to it and pressing Enter/Spacebar keys). * Notice that the widget content is revealed via an animation. * Activating the button (now showing "Hide") again causes the content to be concealed, but slightly faster than when it is revealed. 1. Change your accessibility settings to prefer reduced motion. * In MacOS, open System Settings => Accessibility => Display => Reduce motion 1. Activate the "Explanation" button again. * Notice that the widget content is shown without any animation. * Don't forget to reset your accessibility settings. ## Affected Behavior: ### Before - Current UX https://github.com/Khan/perseus/assets/13896410/dcb1fcdc-c4cd-4e01-b342-e4a7f39ba583 ### After - New UX https://github.com/Khan/perseus/assets/13896410/a8622fba-c61e-4107-9a87-80fe1f6829bb Author: mark-fitzgerald Reviewers: jeremywiebe, benchristel, mark-fitzgerald Required Reviewers: Approved By: jeremywiebe Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage, ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Extract i18n strings (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, ✅ Jest Coverage (ubuntu-latest, 20.x) Pull Request URL: #1060
I think Heydon Pickering makes a very valid point, in his article "Aria-controls is poop", when he says this attribute encourages web devs to not worry about having their source code and DOM in a sensible and meaningful order. It encourages the kind of thinking: "Because we've used aria-controls, we don't have to worry about source order, right? We've connected up the dots explicitly, with our magic attribute! And it doesn't matter about all the elements between a controller and its subject because we've tunneled between them, right?" Finally JAWS changing the default to not making those awful, repetitive announcements was the right way to go. I think it is one of those things that power screen reader users might like to switch on, but that most ordinary, non-tech users were probably just mystified and/or annoyed by. Certainly when testing I hated those announcements, especially when there were maybe 20 or so instances on a page! |
aria-controls
did not have the widest support, but with the JAWS release notes (April 2019) it will no longer be announced by default.This update appears to have been made specifically to address "In most cases, the target of the controls relationship is adjacent to the element or does not provide any useful information." But testing should be done to verify.
Additional reading from past
aria-controls
discussion:2017 Ticket about
aria-controls
should only point to visible elements.The text was updated successfully, but these errors were encountered: