Skip to content

Commit 162e738

Browse files
Add support for calculating the accessible label and the accessible role of elements (#1444)
1 parent d896b31 commit 162e738

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

index.html

+96
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,18 @@ <h3>Endpoints</h3>
893893
<td><a>Is Element Enabled</a></td>
894894
</tr>
895895

896+
<tr>
897+
<td>GET</td>
898+
<td>/session/{<var>session id</var>}/element/{<var>element id</var>}/computedrole</td>
899+
<td><a>Get Computed Role</a></td>
900+
</tr>
901+
902+
<tr>
903+
<td>GET</td>
904+
<td>/session/{<var>session id</var>}/element/{<var>element id</var>}/computedlabel</td>
905+
<td><a>Get Computed Label</a></td>
906+
</tr>
907+
896908
<tr>
897909
<td>POST</td>
898910
<td>/session/{<var>session id</var>}/element/{<var>element id</var>}/click</td>
@@ -5161,6 +5173,73 @@ <h4><dfn>Is Element Enabled</dfn></h4>
51615173
<li><p>Return <a>success</a> with data <var>enabled</var>.
51625174
</ol>
51635175
</section> <!-- /Is Element Enabled -->
5176+
5177+
<section>
5178+
<h4><dfn>Get Computed Role</dfn></h4>
5179+
5180+
<table class="simple jsoncommand">
5181+
<tr>
5182+
<th>HTTP Method</th>
5183+
<th>URI Template</th>
5184+
</tr>
5185+
<tr>
5186+
<td>GET</td>
5187+
<td>/session/{<var>session id</var>}/element/{<var>element id</var>}/computedrole</td>
5188+
</tr>
5189+
</table>
5190+
5191+
<p>The <a>remote end steps</a> are:
5192+
5193+
<ol>
5194+
<li><p>If the <a>current browsing context</a> is <a>no longer open</a>,
5195+
return <a>error</a> with <a>error code</a> <a>no such window</a>.
5196+
5197+
<li><p><a>Handle any user prompts</a>
5198+
and return its value if it is an <a>error</a>.
5199+
5200+
<li><p>Let <var>element</var> be the result
5201+
of <a>trying</a> to <a>get a known connected element</a>
5202+
with <a>url variable</a> <var>element id</var>.
5203+
5204+
<li><p>Let <var>role</var> be the result of computing the <a>WAI-ARIA role</a> of <var>element</var>.
5205+
5206+
<li><p>Return <a>success</a> with data <var>role</var>.
5207+
</ol>
5208+
</section> <!-- /Get Element Computed Role -->
5209+
5210+
<section>
5211+
<h4><dfn>Get Computed Label</dfn></h4>
5212+
5213+
<table class="simple jsoncommand">
5214+
<tr>
5215+
<th>HTTP Method</th>
5216+
<th>URI Template</th>
5217+
</tr>
5218+
<tr>
5219+
<td>GET</td>
5220+
<td>/session/{<var>session id</var>}/element/{<var>element id</var>}/computedlabel</td>
5221+
</tr>
5222+
</table>
5223+
5224+
<p>The <a>remote end steps</a> are:
5225+
5226+
<ol>
5227+
<li>
5228+
<p>If the <a>current browsing context</a> is <a>no longer open</a>,
5229+
return <a>error</a> with <a>error code</a> <a>no such window</a>.
5230+
5231+
<li><p><a>Handle any user prompts</a>
5232+
and return its value if it is an <a>error</a>.
5233+
5234+
<li><p>Let <var>element</var> be the result
5235+
of <a>trying</a> to <a>get a known connected element</a>
5236+
with <a>url variable</a> <var>element id</var>.
5237+
5238+
<li><p>Let <var>label</var> be the result of a <a>Accessible Name and Description Computation</a> for the <a>Accessible Name</a> of the <var>element</var>.
5239+
5240+
<li><p>Return <a>success</a> with data <var>label</var>.
5241+
</ol>
5242+
</section> <!-- /Get Element Computed Label -->
51645243
</section> <!-- /State -->
51655244

51665245
<section>
@@ -9521,6 +9600,23 @@ <h2>Index</h2>
95219600
-->
95229601

95239602
<dl>
9603+
<dt>ARIA and related specifications
9604+
<dd>
9605+
<p>The following terms are defined
9606+
in the Accessible Rich Internet Applications (WAI-ARIA) 1.2 specification: [[wai-aria-1.2]]
9607+
<ul>
9608+
<li><dfn><a href="https://w3c.github.io/aria/#introroles">WAI-ARIA role</a></dfn>
9609+
</ul>
9610+
9611+
<dd>
9612+
<p>The following terms are defined
9613+
in the Accessible Name and Description Computation 1.1 specification: [[accname-1.1]]
9614+
<ul>
9615+
<li><dfn><a href="https://www.w3.org/TR/accname-1.1/#dfn-accessible-name">Accessible Name</a></dfn>
9616+
<li><dfn><a href="https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_te">Accessible
9617+
Name and Description Computation</a></dfn>
9618+
</ul>
9619+
95249620
<dt>Web App Security
95259621
<dd><p>The following terms are defined
95269622
in the Content Security Policy Level 3 specification: [[CSP3]]

0 commit comments

Comments
 (0)