-
Notifications
You must be signed in to change notification settings - Fork 228
Get Accessibility Properties #1960
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
base: master
Are you sure you want to change the base?
Changes from all commits
82d7844
71d6ead
1c104df
f02fdbd
174fccf
55e15b3
24d7021
4472187
eef1ef4
1a04a3c
97a068d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1040,6 +1040,19 @@ <h3>Endpoints</h3> | |
| <td>/session/{<var>session id</var>}/print</td> | ||
| <td><a>Print Page</a></td> | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td>GET</td> | ||
| <td>/session/{<var>session id</var>}/element/{<var>element id</var>}/accessibilityproperties</td> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would these endpoints allow getting the entire a11y tree? what is the expected workflow? getting accessibilityproperties for the root element and then using
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it also seems like it would require many roundtrips to get properties for all elements.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we will have some "subtree" tests which walk the accessibility tree by accessibility ID, for example: https://github.com/web-platform-tests/wpt/blob/master/wai-aria/subtree/tablist.tentative.html (this test runs on firefox because of the marionette endpoint: https://wpt.fyi/results/wai-aria/subtree?label=experimental&label=master&aligned) In general, though, the subtrees are not testable, because they are pretty different between browsers, and we don't think we will ever have full alignment. The main issue is how much "generic" nodes there are (things that represent something meaningless in the a11y tree, like a div for styling purposes). We expect only to test specific scenarios. We discussed having an endpoint for the whole subtree, but we think it's more comment to just test a node or a few children/parents, thus the current design.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, that makes sense but I wonder once this is published if other WebDriver clients might start building out features based on the subtree iteration mechanisms available (thus starting to rely on the non-specified behavior) and require many roundtrips to implement the subtree retrieval. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I expect that will be the case, and don't see harm in testing the subtree of smaller features, like a known list or table with a known style sheet... However, it won't be a reliable cross-UA WPT test yet to include something like
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it make sense to add a note about this to the spec text here? |
||
| <td><a>Get Accessibility Properties For Element</a></td> | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td>GET</td> | ||
| <td>/session/{<var>session id</var>}/accessibility/properties/{<var>accessibility id</var>}</td> | ||
| <td><a>Get Accessibility Properties For Accessibility Node</a></td> | ||
| </tr> | ||
|
|
||
| </table> | ||
| </section> <!-- /Endpoints --> | ||
|
|
||
|
|
@@ -1193,6 +1206,14 @@ <h3>Errors</h3> | |
| and cannot be brought into that viewport. | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td><dfn>no such accessibility node</dfn> | ||
| <td>404 | ||
| <td><code>no such accessibility node</code> | ||
| <td>An <a>accessibility node</a> could not be located on the page | ||
| using the given search parameters. | ||
| </tr> | ||
|
|
||
| <tr> | ||
| <td><dfn>no such alert</dfn> | ||
| <td>404 | ||
|
|
@@ -6028,6 +6049,42 @@ <h4><dfn>Get Computed Label</dfn></h4> | |
| <li><p>Return <a>success</a> with data <var>label</var>. | ||
| </ol> | ||
| </section> <!-- /Get Element Computed Label --> | ||
|
|
||
| <section> | ||
| <h4><dfn>Get Accessibility Properties For Element</dfn></h4> | ||
|
|
||
| <table class="simple jsoncommand"> | ||
| <tr> | ||
| <th>HTTP Method</th> | ||
| <th>URI Template</th> | ||
| </tr> | ||
| <tr> | ||
| <td>GET</td> | ||
| <td>/session/{<var>session id</var>}/element/{<var>element id</var>}/accessibilityproperties</td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| <p>The <a>remote end steps</a>, given <var>session</var>, <var>URL | ||
| variables</var> and <var>parameters</var> are: | ||
|
|
||
| <ol> | ||
| <li><p>If <var>session</var>'s <a>current browsing context</a> is <a>no longer open</a>, | ||
| return <a>error</a> with <a>error code</a> <a>no such window</a>. | ||
|
|
||
| <li><p><a>Try</a> to <a>handle any user prompts</a> | ||
| with <var>session</var>. | ||
|
|
||
| <li><p>Let <var>element</var> be the result | ||
| of <a>trying</a> to <a>get a known element</a> | ||
| with <var>URL variables</var>["<code>element id</code>"]. | ||
|
|
||
| <li><p>Let <var>accessible</var> be the <a>accessibility node</a> that corresponds to this element. If no <a>accessibility node</a> exists, return <a>error</a> with <a>error code</a> <a>no such accessibility node</a>. | ||
|
|
||
| <li><p>Let <var>properties</var> be the result of computing the <a>accessibility properties</a> of <var>accessible</var>. | ||
|
|
||
| <li><p>Return <a>success</a> with data <var>properties</var>. | ||
| </ol> | ||
| </section> <!-- /Get Element Accessibility Properties --> | ||
| </section> <!-- /State --> | ||
|
|
||
| <section> | ||
|
|
@@ -11116,6 +11173,42 @@ <h3><dfn>Take Element Screenshot</dfn></h3> | |
| </section> <!-- /Take Element Screenshot --> | ||
| </section> <!-- /Screen capture --> | ||
|
|
||
| <section> | ||
| <h2>Accessibility</h2> | ||
| <section> | ||
| <h3><dfn>Get Accessibility Properties for Accessibility Node</dfn></h3> | ||
|
|
||
| <table class="simple jsoncommand"> | ||
| <tr> | ||
| <th>HTTP Method</th> | ||
| <th>URI Template</th> | ||
| </tr> | ||
| <tr> | ||
| <td>GET</td> | ||
| <td>/session/{<var>session id</var>}/accessibility/properties/{<var>accessibility id</var>}</td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| <p>The <a>remote end steps</a>, given <var>session</var>, <var>URL | ||
| variables</var> and <var>parameters</var> are: | ||
|
|
||
| <ol> | ||
| <li><p>If <var>session</var>'s <a>current browsing context</a> is <a>no longer open</a>, | ||
| return <a>error</a> with <a>error code</a> <a>no such window</a>. | ||
|
|
||
| <li><p><a>Try</a> to <a>handle any user prompts</a> | ||
| with <var>session</var>. | ||
|
|
||
| <li><p>Let <var>node</var> be the <a>accessibility node</a> with <a>accessibility node ID</a> matching the <var>URL variables</var>["<code>accessibility id</code>"]. If no such <a>accessibility node</a> exists, return <a>error</a> with <a>error code</a> <a>no such accessibility node</a>. | ||
|
|
||
| <li><p>Let <var>properties</var> be the result of computing the <a>accessibility properties</a> of <var>node</var>. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know how well does this corresponds to https://chromedevtools.github.io/devtools-protocol/tot/Accessibility/#type-AXNode?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, actually, this will be backed by the devtools node -- the webdriver command goes through the devtools protocol to get this information. The difference is that to start it will be a subset of the properties -- just the ones all three browsers agree to expose, and the agreement is being worked out in the other PR (w3c/aria#2800).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you also working on the implementation in Chromium?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I sent it to you, but just in case here is is again: https://chromium-review.googlesource.com/c/chromium/src/+/7922212 |
||
|
|
||
| <li><p>Return <a>success</a> with data <var>properties</var>. | ||
| </ol> | ||
|
|
||
| </section> <!-- /Get Accessibility Properties for Accessibility Node --> | ||
| </section> <!-- /Accessibility --> | ||
|
|
||
| <section> | ||
| <h2>Print</h2> | ||
|
|
||
|
|
@@ -11549,6 +11642,7 @@ <h2>Acknowledgements</h2> | |
| <!-- Jonathan Lipps --> Jonathan Lipps, | ||
| <!-- Jonathon Kereliuk --> Jonathon Kereliuk, | ||
| <!-- Luke Inman-Semerau --> Luke Inman-Semerau, | ||
| <!-- Lola Odelola --> Lola Odelola, | ||
| <!-- Maja Frydrychowicz --> <a href=https://www.erranderr.com/>Maja Frydrychowicz</a>, | ||
| <!-- Malini Das --> Malini Das, | ||
| <!-- Manoj Kumar --> Manoj Kumar, | ||
|
|
@@ -11561,6 +11655,7 @@ <h2>Acknowledgements</h2> | |
| <!-- Simon Stewart --> <a href=http://www.rocketpoweredjetpants.com/>Simon Stewart</a>, | ||
| <!-- Sri Harsha --> Sri Harsha, | ||
| <!-- Titus Fortner --> Titus Fortner, | ||
| <!-- Valerie Young--> Valerie Young, | ||
| <!-- Vangelis Katsikaros --> and Vangelis Katsikaros. | ||
|
|
||
| <!-- ~~~ end sort ~~~ --> | ||
|
|
@@ -11603,6 +11698,10 @@ <h2>Index</h2> | |
| in the Accessible Rich Internet Applications (WAI-ARIA) 1.2 specification: [[wai-aria-1.2]] | ||
| <ul> | ||
| <li><dfn><a href="https://w3c.github.io/aria/#introroles">WAI-ARIA role</a></dfn> | ||
| <li><dfn><a href="https://w3c.github.io/aria/#accessibility_tree">Accessibility tree</a></dfn> | ||
|
spectranaut marked this conversation as resolved.
|
||
| <li><dfn><a href="https://w3c.github.io/aria/#dfn-accessibility-api">Accessibility API</a></dfn> | ||
| <li><dfn><a href="https://w3c.github.io/aria/#aria-hidden">aria-hidden</a></dfn> | ||
|
|
||
| </ul> | ||
|
|
||
| <dd> | ||
|
|
@@ -11614,6 +11713,23 @@ <h2>Index</h2> | |
| Name and Description Computation</a></dfn> | ||
| </ul> | ||
|
|
||
| <dd> | ||
| <p>The following terms are defined | ||
| in the Core Accessibility API Mappings (Core-AAM) 1.2 specification: [[core-aam-1.2]] | ||
| <ul> | ||
| <!-- Computed accessibility properties --> <li><dfn><a | ||
| href="https://w3c.github.io/core-aam/#computed_accessibility_properties">Computed accessibility properties</a></dfn> | ||
| <!-- Accessibility node --> <li><dfn><a | ||
| href="https://w3c.github.io/core-aam/#computed_accessibility_properties">Accessibility node</a></dfn> | ||
| <!-- accessibilityId --> <li><dfn><a | ||
| href="https://w3c.github.io/core-aam/#computed_accessibility_properties_aria_states_and_properties">accessibilityId</a></dfn> | ||
| <!-- parent --> <li><dfn><a | ||
| href="https://w3c.github.io/core-aam/#computed_accessibility_properties_aria_states_and_properties">parent</a></dfn> | ||
| <!-- children --> <li><dfn><a | ||
| href="https://w3c.github.io/core-aam/#computed_accessibility_properties_aria_states_and_properties">children</a></dfn> | ||
| </ul> | ||
|
|
||
|
|
||
| <dt>Web App Security | ||
| <dd><p>The following terms are defined | ||
| in the Content Security Policy Level 3 specification: [[CSP3]] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.