You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+7-40Lines changed: 7 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -324,46 +324,13 @@ <h2>Role mapping</h2>
324
324
<p>Platform <aclass="termref" href="#dfn-accessibility-api">accessibility <abbrtitle="Application Programming Interfaces">APIs</abbr></a> traditionally have had a finite set of predefined <aclass="termref">roles</a> that are expected by <aclass="termref">assistive technologies</a> on that platform and only one or two roles may be exposed. In contrast, <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> allows multiple roles to be specified as an ordered set of space-separated valid role tokens. The additional roles are fallback roles similar to the concept of specifying multiple fonts in case the first choice font type is not supported.</p>
325
325
<sectionid="roleMappingGeneralRules">
326
326
<h2>General rules</h2>
327
-
<p>The following rules describe how to expose WAI-ARIA roles using the accessibility <abbrtitle="application programming interface">API</abbr>:</p>
328
-
<ol>
329
-
<li>The user agent MUST use the first token in the sequence of tokens in the role <aclass="termref">attribute</a> value which matches the name of any non-abstract <abbrtitle="Accessible Internet Application">WAI-ARIA</abbr> role according to rules that are specified in the <ahref="#mapping_role_table">Role Mapping Table</a> below. See <ahref="#mapping_conflicts">Conflicts between native markup semantics and WAI-ARIA</a> for additional information. Note that when <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> roles override host language semantics, there are no changes in the <abbrtitle="Document Object Model">DOM</abbr>, only in the <aclass="termref">accessibility tree</a>. In the absence of author-supplied scripts, the presence of <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> roles might not make sense. But user agents MUST map <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> roles even in the absence of author-supplied scripts.
330
-
<p>The following steps will correctly identify the applicable <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> role:</p>
331
-
<ol>
332
-
<li>Use the rules of the host language to detect that an element has a role attribute and to identify the attribute value string for it.</li>
333
-
<li>Separate the attribute value string for that attribute into a sequence of whitespace-free substrings by separating on whitespace.</li>
334
-
<li>Do a comparison of the substrings to all the names of the non-abstract <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> roles. Case-sensitivity of the comparison inherits from the case-sensitivity of the host language.</li>
335
-
<li>Use the first such substring in textual order that matches the name of a non-abstract <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> role for the <abbrtitle="application programming interface">API</abbr> role mapping. See the <ahref="#mapping_role_table">Role Mapping Table</a> below for details.</li>
336
-
</ol>
337
-
</li>
338
-
<li>User agents MUST NOT map roles defined in the <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> specification as "abstract" via the standard role mechanism of the accessibility <abbrtitle="application programming interface">API</abbr>. Use the fallback procedure specified in the next rule if only an abstract role is provided. The abstract roles are:
<li>If the element does not have a role attribute, or if the role attribute contains no tokens matching the name of a non-abstract <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> role, the user agent MUST fall back on normal processing of the base markup for the element. For example, for <samp><table role="foo"></samp> use the <abbrtitle="Hypertext Markup Language">HTML</abbr><code>table</code> element to determine the platform accessibility <abbrtitle="application programming interface">API</abbr> role mapping. For <samp><input type="text" role="bar"></samp>, use the mapping for an <abbrtitle="Hypertext Markup Language">HTML</abbr><code>text input</code>.</li>
355
-
<li>When an explicit or inherited role of <code>none</code> or <code>presentation</code> is applied to an element, the user agent MUST implement the rules for the <aclass="role-reference" href="#none"><code>none</code></a> or the <aclass="role-reference" href="#presentation"><code>presentation</code></a><aclass="termref">role</a> defined in <cite><aclass="specref" href="">Accessible Rich Internet Applications (WAI-ARIA) 1.1</a></cite> [[!WAI-ARIA]]. </li>
356
-
<liid="exposeRoleString">User agents MUST expose the <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> role string if the <abbrtitle="application programming interface">API</abbr> supports a mechanism to do so. This allows assistive technologies to do their own additional processing of roles.
357
-
<ul>
358
-
<li>
359
-
<abbrtitle="Microsoft Active Accessibility">MSAA</abbr>: <ahref="https://msdn.microsoft.com/en-us/library/windows/desktop/dd373608(v=vs.85).aspx" title="Object Roles (Windows)">not supported</a>. User agents SHOULD NOT expose a custom role in MSAA's <code>accRole</code> property.</li>
360
-
<li>IAccessible2: expose as an object attribute pair (<code>xml-roles:"string"</code>)</li>
361
-
<li><abbrtitle="User Interface Automation">UIA</abbr>: expose as <code>AriaRole</code> property. The <code>AriaRole property</code> can also support secondary roles using a space as a separator.</li>
362
-
<li><abbrtitle="Accessibility Toolkit">ATK</abbr>/<abbrtitle="Assistive Technology - Service Provider Interface">AT-SPI</abbr>: expose as an object attribute pair (<code>xml-roles:"string"</code>)</li>
363
-
</ul>
364
-
</li>
365
-
<li>Platform accessibility <abbrtitle="application programming interfaces">APIs</abbr> typically do not provide a vehicle to notify assistive technologies that a role has changed. Due to this and document caching, assistive technologies are unlikely to process a change in role attribute value. Authors who wish to change a role are advised by the <abbrtitle="Accessible Rich Internet Applications">WAI-ARIA</abbr> specification to delete the associated element and its children and replace it with a new element having the appropriate role. If a role is changed, however, user agents SHOULD update the mapping in order to reflect the content in the <abbrtitle="Document Object Model">DOM</abbr>. Since assistive technologies will not know that the role has changed, user agents MAY address this error condition by treating it as removing a subtree item and inserting a new one as described in <ahref="#mapping_events_visibility">Changes to document content or node visibility</a>.</li>
366
-
</ol>
327
+
<pid="exposeRoleString">User agents MUST expose the <abbrtitle="Accessible Rich Internet Application">WAI-ARIA</abbr> role string if the <abbrtitle="application programming interface">API</abbr> supports a mechanism to do so. This allows assistive technologies to do their own additional processing of roles. </p>
328
+
<ul>
329
+
<li><abbrtitle="Microsoft Active Accessibility">MSAA</abbr>: <ahref="https://msdn.microsoft.com/en-us/library/windows/desktop/dd373608(v=vs.85).aspx" title="Object Roles (Windows)">not supported</a>. User agents SHOULD NOT expose a custom role in MSAA's <code>accRole</code> property.</li>
330
+
<li>IAccessible2: expose as an object attribute pair (<code>xml-roles:"string"</code>)</li>
331
+
<li><abbrtitle="User Interface Automation">UIA</abbr>: expose as <code>AriaRole</code> property. The <code>AriaRole property</code> can also support secondary roles using a space as a separator.</li>
332
+
<li><abbrtitle="Accessibility Toolkit">ATK</abbr>/<abbrtitle="Assistive Technology - Service Provider Interface">AT-SPI</abbr>: expose as an object attribute pair (<code>xml-roles:"string"</code>)</li>
0 commit comments