-
Notifications
You must be signed in to change notification settings - Fork 27
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
Consistent accessibility tree outputs #211
Comments
do you mean the vocabulary should be standardized? |
Not exactly. I'm not an expert here, so it's possible that I'm missing something in my explanation. My understanding of the world today is that:
I see value in investigating these differences between browsers and potentially setting up tests that keep things consistent across platforms. |
They use the tree in an indirect way (see below).
The "universal" accessibility tree is not in a spec, but the mapping to OS APIs is (see here).
I agree. Unfortunately, there is not yet WPT infrastructure to test the OS mappings, or even to test the computed ARIA roles of elements. (And there is--by design--no web developer exposed API for any of these things.) I think we should fix this infrastructure problem in 2023 so that we can test interop for the accessibility tree in Interop 2024. |
Probably this should be discussed with W3C accessibility WGs. |
@zcorpan I know that Bocoup has done a lot of work in this space. Do or colleagues have thoughts on the test infra side of this? |
I think we should treat this issue as a proposal for an Investigation area around improved accessibility testing in WPT. I'm gathering additional feedback now from Chrome a11y team experts and will make a more precise proposal soon. |
I've finished gathering support from within Chrome a11y experts. I'd like to update this proposal to the following: Proposal: Accessibility Interop Testing How: form an investigation group that works towards an accepted wpt.fyi RFC for accessibility testing, and builds prototypes in browsers to verify this RFC is workable. It would receive a 100% score for all browsers if the RFC was accepted and at least one complete prototype implementation exists for at least one browser that runs some accessibility tests on wpt.fyi. This group will meet monthly through 2023 to work towards this goal. Answers to the remaining questions from the RFC text for an investigation effort:
Developers very often experience lack of interop with a11y, which is always the result for any feature unless there is at least some interop testing in place. See also the links in the original comment for this issue. Users suffer as a result.
A large fraction of the world's population have one need or another for a11y features (see here for example). This page indicates up to 20% of website visitors could be affected.
|
We've been working on ARIA AT which is end-to-end screen reader tests, i.e. a test is some HTML+CSS+JS (currently the tests are based on APG design pattern examples but could be any tests) with a particular user interaction (pressing keys usually) and the assertions are done on the spoken output. This setup has no insight at all into what the browser's accessibility tree is like, or what is exposed to the OS accessibility API. But interop bugs somewhere in the "stack" can still be caught if they affect the spoken output. See https://github.com/w3c/aria-at-automation for work to support automation of these tests. Maybe AOM or WebDriver accessibility primitives (w3c/webdriver#1439 and w3c/webdriver#1441) could help to test the browser's accessibility tree. For testing OS APIs, I believe there are manual tests in wpt (e.g. /accname/), and IIRC there's tooling somewhere that automates those tests (not baked into wpt infra). |
Testing the AccName spec (using computedLabel) may be a good first step: |
Interop testing of some TBD accessibility tree was one of the long-term original goals of AOM. One major complication is that WebKit based its internal tree off the RenderTree, compared to Gecko, which starts off the DOM tree. Chromium made a major implementation change a few years ago to more closely align with Gecko, but all 3 are still fairly different. All of the engine-internal accessibility trees mentioned here are distinct from the platform accessibility API trees, so each engine has other mapping outputs from its internals to the platform trees. These are what’s referenced by the AAM specs: Core-AAM, HTML-AAM, etc. IIRC where the AOM and ARIA groups landed for interop in the shorter term was:
As specified elsewhere, WebKit’s potential acceptance any investigations for WPT would be conditional on a scoring change such that investigations should not penalize the score of any implementation. |
Thank you for proposing consistent accessibility tree outputs for inclusion in Interop 2023. We are pleased to let you know that this proposal was accepted as part of the Accessibility Testing investigation effort. You can follow the progress of this investigation on the Interop 2023 dashboard. For an overview of our process, see the proposal selection summary. Thank you for contributing to Interop 2023! |
@foolip wrote:
For what it's worth, I'm all for an InterOp 2023 Accessibility Investigation, but "consistent accessibility tree outputs" is likely to be unachievable in 2023, for the reasons I mentioned above. I'd love to help with the scoping of this investigation, and with some of the effort. |
Actually I see now @chrishtr proposed a reduced scope (unrelated to tree consistency) that several of us at Apple think is much more achievable.
I believe all or most HTML-AAM and role mapping tests are achievable using get_computed_role, while the AccName tests I'm starting on are mostly achievable using get_computed_label. There may be some minor differences related to pseudo-elements, UA Shadow DOM components, etc, but we can address these when we come to them. I am not yet certain how we'd test the CoreAAM mappings as proposed, since those are all platform API specific, and would need platform-level verification that is currently outside the scope of WPT, if I understand correctly. @zcorpan may have some ideas for how to incorporate those. |
I'd like to move the /accname tests into /accessibility/manual, so that I can start on a set of automated tests covering AccName in /accessibility/accname. See web-platform-tests/wpt#38502 |
Further, as I understand it, it's unclear how many bugs testing Core-AAM would actually find, and it's by far the hardest thing to do from an infrastructure point of view. It seems like the investigation project should be much more heavily skewed towards the ARIA roles/labels the browser believes things have. |
We'd need some way of interfacing with the platform accessibility API to test core-aam. Or maybe the browser "knows" what the mapping is, and can expose it to WebDriver? Maybe testing core-aam is more of the realm of ARIA-AT than wpt, although ARIA-AT doesn't currently directly test the platform accessibility API either. cc @jugglinmike |
Description
Browsers should investigate and work towards generating consistent accessibility tries from the same DOM + CSS.
Rationale
All browsers produce subtly different accessibility trees for the same DOM + CSS. Some examples:
CSS
display
property impacts the a11y tree inconsistentlyhttps://www.powermapper.com/tests/screen-readers/aria/
https://a11ysupport.io/
For something more hands-on, on a macOS device, using VoiceOver to interact with this W3C datepicker example gives slightly different results between Chrome, Safari, and Firefox:
While some differences are mostly innocuous ("dialog" vs "web dialog"), having any sort of standardization or interop testing would be a huge boon to all web developers trying to build accessible experiences.
Investigation Roadmap
See #211 (comment)
(Description updated by @foolip Oct 31.)
The text was updated successfully, but these errors were encountered: