-
Notifications
You must be signed in to change notification settings - Fork 225
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
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> | ||||||
| <td><a>Get Accessibility Properties</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 Accessible Object</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 accessible</dfn> | ||||||
| <td>404 | ||||||
| <td><code>no such accessible</code> | ||||||
| <td>An accessibility node could not be located on the page | ||||||
| using the given search parameters. | ||||||
| </tr> | ||||||
|
|
||||||
| <tr> | ||||||
| <td><dfn>no such alert</dfn> | ||||||
| <td>404 | ||||||
|
|
@@ -1255,6 +1276,14 @@ <h3>Errors</h3> | |||||
| <td>A new <a>session</a> could not be created. | ||||||
| </tr> | ||||||
|
|
||||||
| <tr> | ||||||
| <td><dfn>stale accessible reference</dfn> | ||||||
| <td>404 | ||||||
| <td><code>stale accessible reference</code> | ||||||
|
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 we have confidence that the implementations will retain the difference between “was here but is now stale” and “not found for some other reason”? If not, the first 404 may suffice. |
||||||
| <td>A <a>command</a> failed because | ||||||
| the referenced <a>accessible</a> is no available. | ||||||
| </tr> | ||||||
|
|
||||||
| <tr> | ||||||
| <td><dfn>stale element reference</dfn> | ||||||
| <td>404 | ||||||
|
|
@@ -6028,6 +6057,43 @@ <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</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>accessible object</a> that corrosponds to this element in the <a>accessibility tree</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 +11182,68 @@ <h3><dfn>Take Element Screenshot</dfn></h3> | |||||
| </section> <!-- /Take Element Screenshot --> | ||||||
| </section> <!-- /Screen capture --> | ||||||
|
|
||||||
| <section> | ||||||
| <h2>Accessibility</h2> | ||||||
|
|
||||||
| <p> An <dfn>accessibility ID</dfn> is a string value representing a handle to an <a>accessible object</a> in a specific WebDriver session. | ||||||
|
|
||||||
| <p> <dfn>Accessibility properties</dfn> is a JSON <a>Object</a> that contains the relevant <a>WAI-ARIA states and properties</a> of an <a>accessible object</a>, as well as the following properties: | ||||||
|
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. Not to downgrade ARIA, but it’s a subset here:
Suggested change
|
||||||
|
|
||||||
| <dl> | ||||||
| <dt>"<code>accessibilityId</code>" | ||||||
| <dd>The <a>accessibility ID</a> of this <a>accessible object</a>. | ||||||
|
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. Object or node? |
||||||
|
|
||||||
| <dt>"<code>parent</code>" | ||||||
| <dd>The <a>accessibility ID</a> of the parent of this <a>accessible object</a> in the <a>accessibility tree</a>, including <a>ignored accessible objects</a>. | ||||||
|
|
||||||
| <dt>"<code>children</code>" | ||||||
| <dd>A list of <a>accessibility IDs</a> representing the children of this <a>accessible object</a> in the <a>accessibility tree</a>, including <a>ignored accessible objects</a>. | ||||||
|
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.
Suggested change
|
||||||
| </dl> | ||||||
|
|
||||||
| <p> <dfn>Ignored accessible objects</dfn> are accessible objects that represent <a>elements which are excluded from the accessibility tree</a>. The <a>accessibility properties</a> of these <a>accessible objects</a> must only have the keys <va>accessibilityID</var>, <va>parent</var>, <va>children</var> and <va>role</var> set to <code>"none"</code>. | ||||||
|
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. Ignored accessible children may not be implementable as written. The “ignored” state is usually on the non-accessibility rendered object which can—modulo implementation details—result in no backing accessibility node to return in the child list. |
||||||
|
|
||||||
| <p>To <dfn>get a known accessible object</dfn> given <var>session</var> and <var>reference</var>: | ||||||
|
|
||||||
| <ol class="algorithm"> | ||||||
| <li><p>TO DO: Should we create a parallel to the specification of <a>get a known element</a>? Do we need to make a parallel structure to <a>browsing context group node map</a> and <a>node id map</a>? | ||||||
|
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 don’t think we need it, unless the element ID can’t be returned in the property bag. |
||||||
| </ol> | ||||||
|
|
||||||
| <section> | ||||||
| <h3><dfn>Get Accessibility Properties for Accessible Object</dfn></h3> | ||||||
|
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. Node not Object, right? |
||||||
|
|
||||||
| <table class="simple jsoncommand"> | ||||||
| <tr> | ||||||
| <th>HTTP Method</th> | ||||||
| <th>URI Template</th> | ||||||
| </tr> | ||||||
| <tr> | ||||||
| <td>GET</td> | ||||||
| <td>/session/{<var>session id</var>}/accessibiltiy/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 result | ||||||
| of <a>trying</a> to <a>get a known accessible object</a> | ||||||
| with <var>URL variables</var>["<code>accessibility id</code>"]. | ||||||
|
|
||||||
| <li><p>Let <var>properties</var> be the result of computing the <a>accessibility properties</a> of <var>node</var>. | ||||||
|
|
||||||
| <li><p>Return <a>success</a> with data <var>properties</var>. | ||||||
| </ol> | ||||||
|
|
||||||
| </section> <!-- /Get Accessibility Properties for Accessible Object --> | ||||||
| </section> <!-- /Accessibility --> | ||||||
|
|
||||||
| <section> | ||||||
| <h2>Print</h2> | ||||||
|
|
||||||
|
|
@@ -11602,7 +11730,11 @@ <h2>Index</h2> | |||||
| <p>The following terms are defined | ||||||
| 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/#dfn-accessible-object"></a>accessible object</dfn> | ||||||
|
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. Ditto node? 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. Maybe we should sync an ARIA edit with this PR? |
||||||
| <li><dfn><a href="https://w3c.github.io/aria/#accessibility_tree">accessibility tree</a></dfn> | ||||||
| <li><dfn><a href="https://w3c.github.io/aria/#tree_exclusion">elements which are excluded from the accessibility tree</a></dfn> | ||||||
| <li><dfn><a href="https://w3c.github.io/aria/#introroles">WAI-ARIA role</a></dfn> | ||||||
| <li><dfn><a href="https://w3c.github.io/aria/#introstates">WAI-ARIA states and properties</a></dfn> | ||||||
|
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. We’ll need a landing spot for the new “accessibility properties” ref above because this ARIA list is a subset. |
||||||
| </ul> | ||||||
|
|
||||||
| <dd> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we’re trying to match existing precedent for this “no such” phrasing, I’d prefer:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if people really want to keep the precedent, let’s call it “no such accessible node” rather than “no such accessible”