-
Notifications
You must be signed in to change notification settings - Fork 59
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
Computing the Accessible Backing Node, or a similar test-only interface #197
Comments
Once we have some new interface defined, we may need to request new error codes in WebDriver when say, |
Further to @cookiecrook's comment regarding elements not in the a11y tree (originally discussed in web-platform-tests/wpt#38941 (review)): These tests (and perhaps others) set role=none/presentation and expect that the computed role will be "none". role="none" excludes the element from the a11y tree, so we can't get the computed role from the a11y engine. This raises the question: what are the expectations for computed role for nodes which aren't in the a11y tree? Gecko currently returns null, but I can change that to anything: "", "none", whatever. However, it seems to me that there is a subtle difference between role="none" (one very specific way of removing an element from the a11y tree) vs the non-existence of an element in the a11y tree for one of several reasons (role="none", hidden, aria-hidden, ...). Could "none" lead people to think that this is specifically about role="none", when in reality, aria-hidden will return "none" as well? Or will we not return anything and use error codes as @cookiecrook suggests? That said, I don't want to bikeshed too much here. If WebKit and Chromium are happy with "none" for all cases of a11y non-existence, I can just change Gecko's WebDriver implementation to return "none" and move on. Nevertheless, I thought it'd be good to make a clear, documented decision here. |
Putting non-existent accessible nodes aside, an open question for me is whether this needs to be defined as a DOM interface or whether it should be WebDriver specific. Currently, in Gecko's WebDriver implementation, computedRole is not exposed on DOM Element at all. Rather, it is an internal Gecko interface (not WebIDL) that is only accessible via WebDriver; i.e. you can't access it from the DOM at all. As an interesting side note, Gecko does also have an AccessibleNode interface (not used for WebDriver) that was implemented years ago based on a very old version of AOM. |
Another thing to consider is that when something is dynamically added to the DOM (WPT role tests currently do this), it might not immediately be available in the a11y tree. It's unclear what AccessibleNode should do in that case. |
Following up from a mention in the ARIA F2F this week, @jcsteh suggested this might be a static copy of the accessibility element at the time of request. All properties could be static strings including WebDriver identifiers for related accessibility nodes like parent and children. |
[Update: I'm being purposefully vague about syntax because I don't want us to get hung up on implementation details yet.] Discussed a bit with some colleagues. I think all this will require [in WebDriver] is:
The reconciliation between DOM tree versus AX tree could be handled using those to method and the existing WebDriver interface to get a DOM element by its WebDriver element ID. Returned accessibility element can include their property bags (aria attributes, etc.) and AX ID refs to axParent, axChildElements, and associated domElement (if there is one)… that should be enough to build a tree walker and perform automated interop testing of ARIA and related specs. Perhaps an accessibility extension spec to WebDriver, a la the WebAuthN WebDriver extension spec? |
It's still unclear to me whether we're talking about a test-only interface accessible via DOM or an interface in the context of WebDriver. That is, do we expect to be able to make these queries in JS code running in the context of the page (only in WPT tests) or only from WebDriver code? The current computedRole and computedLabel methods are exposed only in WebDriver, so they don't have to be implemented as interfaces accessible via DOM (though they could be depending on the implementation). |
I don't think that's determined yet and either could work, but as I mentioned above, "perhaps an accessibility extension spec to WebDriver" is the best option? |
I think I can understand @jcsteh's confusion, based on the original issue description:
I think that if the primary goal is to define an API which may be used for WPTs, an AccessibleNode interface isn't really going to be realised anywhere (other than perhaps in TestDriver, which afaik isn't standardised but just kind of exists?) How did the BTT/WPT folks envision this working?
I think it makes a big difference which frameworks/tools we're talking about - other than Selenium, I'm not sure what testing frameworks actually use WebDriver (tbh I don't know much about WebDriver in general, but my understanding is that it is largely "remote" from the web page itself, i.e. if you're using WebDriver-based APIs, you're requesting data from the web page rather than interacting with the DOM directly). For something like axe-core, I think we would need either a web-exposed DOM API, or some way to make a DOM API available only in restricted contexts (and I have no idea how we would do that). Also, fwiw:
So does Blink :) |
@alice wrote:
Yes sorry. That was also prefixed with a bikeshed disclaimer: "Nothing is being formally proposed yet, but I think what this incubation may entail is…" Trying to get to a shared understanding of an MVP without getting hung up on specific syntax or implementation details is tricky. I updated my prior comment to purposefully avoid specific syntax, but indicate what I think is the minimum change needed to expand WPT accessibility interop testing beyond In WebDriver, which is used for most accessibility WPT tests at the moment:
The backing interfaces could remain an implementation detail until they need to be surfaced. |
Some WebDriver extensions do spec IDL interfaces in addition to the post method; see Generate Test Report in the Reporting API WebDriver Extension Spec. However, if I understand correctly, the IDL return value could be defined there or elsewhere, and it could be broadly or narrowly defined. |
Probably a way in WebDriver to post a notification (press, trigger action by action label, etc) on an accessibility element, too. |
As I understand the proposal, what this will test in Chromium is about the same as what a developer sees in dev tools, which is useful in general sense. Notably, it won't be testing platform behavior/properties. Is this the final destination? Or, in the future, will we be looking to test platform mappings, such as what is described in AAM specs. Is this a step on the path toward that, or is it heading in a different direction? |
@alice wrote:
Shopping around still, but will hopefully have something concrete enough to discuss by TPAC. @aleventhal wrote:
Yes, the current goal of the WPT Interop 2023 Accessibility Investigation is making sure the browser accessibility internals are mostly the same between browsers (as much as possible with only
I don't think there is precedent in WPT to have a single implementation pass with different expectations per platform... For example, a platform AAM test would require that Chrome on Windows had a different result than Chrome on Mac... I'm not opposed to that, but I don't know of anything like that in WPT, so it would require new investigations. |
Agree with everything. |
Just to clarify, this new AccessibleNode interface should only be allowed to be queried from a WebDriver, right? Or will there be a way for a web author to get the AccessibleNode object through JavaScript? I definitely have privacy concerns if web authors are also allowed to query it, at least for Chromium. But if not, I'm onboard with this WebDriver-scoped approach. |
After talking to Ben, I decided that I like the direction. Although being able to test platform attributes/APIs would be amazing, it would be a huge effort, and it would be blazing new ground as @cookiecrook said. We need something in between and this is that. It will add value in the push for more compatibility between browsers. |
The ignored/generic accessibility object is the thing that worries me most about tree interop testing with Gecko. At this stage, for performance and simplicity, Gecko actually doesn't have a concept of ignored objects. They're either in the tree or they aren't. Anything else is either a real object or a generic. Sometimes, generics get forced into the tree for various reasons. This has no impact on assistive technology, but it will impact strict tree interop testing. That said, all of that is somewhat separate from defining the interfaces. |
Yep. Maybe we need to build in some convenience methods for walking the
tree but skipping ignored/unincluded/generic, applied wherever the UA has
the concept.
We could argue that generic is non-semantic.
So, firstSemanticChild, nextSemanticSibling, semanticChildren, etc.
…On Thu, Aug 24, 2023 at 5:06 PM James Teh ***@***.***> wrote:
The ignored/generic accessibility object is the thing that worries me most
about tree interop testing with Gecko. At this stage, for performance and
simplicity, Gecko actually doesn't have a concept of ignored objects.
They're either in the tree or they aren't. Anything else is either a real
object or a generic. Sometimes, generics get forced into the tree for
various reasons. This has no impact on assistive technology, but it will
impact strict tree interop testing. That said, all of that is somewhat
separate from defining the interfaces.
—
Reply to this email directly, view it on GitHub
<#197 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQAZVY4J2E7XIQQDF2OK3XW666RANCNFSM6AAAAAAWV7AN4E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This seems to echo the concept of accessibility parents nicely. |
Agree. In general I think ATs really only care about generics when there
are interesting properties on them, or to understand line breaking in the
document.
At the level of testing ARIA compliance, it's probably usually useful to
iterate the tree without them, except in a few cases.
A case where we might want to look at a generic within a test could be as
simple as testing <div> with various ARIA properties, to make sure
support/non-support is as expected based on whether the property is global
or not.
…On Thu, Aug 24, 2023 at 6:47 PM Alice ***@***.***> wrote:
We could argue that generic is non-semantic.
This seems to echo the concept of accessibility parents
<https://w3c.github.io/aria/#dfn-accessibility-parent> nicely.
—
Reply to this email directly, view it on GitHub
<#197 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQAZUCCL5M4D7B5W46M4DXW7KX3ANCNFSM6AAAAAAWV7AN4E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@benbeaudry wrote:
I tried to address that in the original description above.
Does that answer your question? If not, please clarify. |
Yes, I agree we should not check in, or we should actively remove any WPT test that fails due to irrelevant implementation details.
Convenience methods in AriaUtils.js or another place seem fine. I don't think the DOM/AX tree mismatches should be masked out of the WebDriver interface though... ARIA's "accessibility parent" concept masks these out for good reason, but it's not a test API. We could reconcile the trees (where necessary) using the respective IDs, but it will be useful to have access to these DOM or AX elements that don't have a direct counterpart in every implementation. For example, AX-ignored elements in the DOM ( We could use the full trees (including implementation diffs) to determine the differences, and align the implementations where it makes sense, or note where we agree to disagree and leave as an implementation detail. |
More on that from the OP:
|
WICG has this in the Friday Sept 15th: 14:30 CET time slot for 60 mins. |
Related TPAC Breakout Time Scheduled: |
Compiling some of the feedback received this week to discuss in the Friday WICG timeslot: Wednesday breakout on the Interop 2023 investigation:
Thursday discussion with WebDriver
|
I have opened a PR to add ability to query by a11y attributes to w3c/webdriver-bidi#660 |
Historical context:
2023 Developments
In the context of the Interop 2023 Accessibility Investigation, we're making progress on cross-browser accessibility testing using TestDriver/WebDriver based interfaces computedrole and computedlabel.
In order to perform more cross-browser accessibility tests, we'll need interfaces beyond role and label. Some of those current testability shortcomings are outlined in web-platform-tests/interop-accessibility#6 and web-platform-tests/interop-accessibility#21
Rather than hanging a growing list of accessibility properties (
computedchecked
,computedrequired
, etc.) off of element, most AOM stakeholders would prefer this be a new test-only interface that can contain the additional properties, probably something akin to the original intention of AOM's proposed AccessibleNode, but with some key differences. In particular, being a read-only interface used for testing, rather than a read/write interface as a general DOM API.Initial Investigation
Nothing is being formally proposed yet, but I think what this incubation may entail is the following:
document
and any given DOM Node.null
except in cases of DOMElement or TextNode where there was a backing AccessibleNode...::before
and::after
are one of several examples.computedaccessiblenode
can be "got" in a WPT interoperability test...Clarifications
The text was updated successfully, but these errors were encountered: