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

Interop Accessibility: add test_driver.get_accessibility_tree #43773

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mzgoddard
Copy link
Contributor

Add get_accessibility_tree endpoint to testdriver. In this change the endpoint presents the interface in Chrome Devtools Protocol's Accessibility.getFullAXTree.

This API can be used to test aria attributes like aria-orientation and aria-invalid and that the browser uses the correct default values when they are not set in the html element.

Related: web-platform-tests/interop-accessibility#51

@mzgoddard mzgoddard requested a review from a team as a code owner December 21, 2023 23:35
@mzgoddard
Copy link
Contributor Author

This change is a part of the work to find and implement additional ways we can test conformance of browsers with accessibility specs. I think this is a good step in following that goal but I am not sure of all the steps that will need to be done to realize it.

Demonstration tests of this can be seen in this downstream change in Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/5100655

And I'm posting this work here in part to fulfill a comment in that change. https://chromium-review.googlesource.com/c/chromium/src/+/5100655/comments/2f3aa4b4_da35e7ed

@wpt-pr-bot wpt-pr-bot added infra testdriver.js wptrunner The automated test runner, commonly called through ./wpt run labels Dec 21, 2023
@foolip
Copy link
Member

foolip commented Jan 29, 2024

To land this in testdriver.js and use it from tests in WPT, you'll need to go through https://github.com/web-platform-tests/rfcs. Note that there is an exception for "extending testdriver.js with a method that closely matches a WebDriver endpoint" but this is wrapping a CDP command, not a standardized WebDriver endpoint.

I understand that this is a proof of concept and that you hope to prove this approach viable before doing all of the spec work. Another path could be to add this in a new testdriver.tentative.js and also add a lint that prevents the use of that except in tentative tests. This is a new approach and would also require an RFC, but it would not be blocked on standardizing a WebDriver endpoint this as the first step.

@gsnedders
Copy link
Member

Another path could be to add this in a new testdriver.tentative.js and also add a lint that prevents the use of that except in tentative tests. This is a new approach and would also require an RFC, but it would not be blocked on standardizing a WebDriver endpoint this as the first step.

@foolip filed an RFC for this at web-platform-tests/rfcs#180

Copy link
Member

@gsnedders gsnedders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @foolip wrote above, this (as with additions to testdriver generally) requires an RFC to be acceptable.

The discussion from a policy point of view should live there, but my view is likely in line with what was written/discussed in web-platform-tests/rfcs#172.

@cookiecrook
Copy link
Contributor

cookiecrook commented Feb 2, 2024

My thoughts align with others above re: RFC in WebDriver and/or AOM.

IIRC, the initial justification for this feature was proposed in:

My thoughts from that one:

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.

It would be nice to see some output comparisons between Chromium's getFullAXTree, WebKit's dumpAccessibilityTree, and the Gecko equivalent. Even though these are going to remain different for the near future, it could inform ongoing WPT testing, and it's possible it could be useful for some WPT tests if they were limited to substring comparison of the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra testdriver.js wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants