-
Notifications
You must be signed in to change notification settings - Fork 27
Define concept of minimum role #454
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
Changes from 19 commits
3efda34
b462c24
c6bae18
cc5b7ab
b1fdcde
be28084
c1a3f1f
e2ac6f8
19a12bd
ef36600
02f6b5a
f7ba989
ed50c33
efb7337
e7b17f7
69513e2
c013064
6257a68
fbe8161
df7200a
4519a4e
6adfe58
1e217e1
8bd08ac
e6b5963
899b517
8bcae45
796734e
ea628aa
fb66dfd
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 |
---|---|---|
|
@@ -211,32 +211,68 @@ <h3>Exposing HTML Features That Do Not Directly Map to Accessibility APIs</h3> | |
</p> | ||
</section> | ||
<section> | ||
<h3>HTML Element Role Mappings</h3> | ||
<h3 id="minimum-role">Exposing HTML Features That Require a Minimum Role</h3> | ||
<p> | ||
A <dfn>minimum role</dfn> is the equivalent WAI-ARIA role an element will map to if the element does not have a more specific implicit role or | ||
platform role mappings, e.g., a non-generic role. This can help ensure that users of assistive technologies get the best possible experience for | ||
commonly-used and valid HTML markup where otherwise a role would not be exposed. | ||
</p> | ||
<p> | ||
A minimum role is provided when all of the following conditions are true: | ||
</p> | ||
<ul> | ||
<li>HTML elements with implicit WAI-ARIA role semantics MUST be mapped to platform <a class="termref">accessibility APIs</a> according to the identified WAI-ARIA role mapping as defined in the [[core-aam-1.2]] specification.</li> | ||
<li>"Not mapped" means the element does not need to be exposed via an <a class="termref">accessibility API</a>. This is usually because the element is not displayed as part of the user interface. However, authors can force some of these elements to be rendered. For instance, by overriding user agent styles to render elements that would have been otherwise set to `display: none`. In these cases, the user agent SHOULD map such elements to the role of <a class="core-mapping" href="#role-map-generic">`generic`</a>.</li> | ||
<li>Where applicable, how an element participates in the computation of its own or another element's <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> and/or <a data-cite="accname-1.2/#dfn-accessible-description">accessible description</a> is described in the <a href="#accessible-name-and-description-computation">Accessible Name and Description Computation</a> section of this document.</li> | ||
<li>Where an element is indicated as having "No corresponding (WAI-ARIA) role", or is mapped to the <a class="core-mapping" href="#role-map-generic">`generic`</a> role, user agents MUST NOT expose the <a class="core-mapping" href="#ariaRoleDescription">`aria-roledescription`</a> property value in the <a class="termref">accessibility tree</a> unless the element has an explicit, conforming `role` attribute value which [[WAI-ARIA-1.2]] does not prohibit the use of `aria-roledescription`.</li> | ||
<li> | ||
<strong>IAccessible2:</strong> | ||
<ul> | ||
<li>All elements with accessible objects should implement the IAccessible, IAccessible2 and IAccessible2_2 interfaces.</li> | ||
</ul> | ||
the author has <strong>not</strong> specified a valid explicit WAI-ARIA role to the element, | ||
<strong>or</strong> the specified role is either `none`, `presentation`, or `generic`, | ||
</li> | ||
<li> | ||
<strong>UIA:</strong> | ||
<ul> | ||
<li>When a <a data-cite="html/forms.html#category-label">labelable element</a> is referenced by a `label` element's `for` attribute, or a descendant of a `label` element, the labelable element's UIA `LabeledBy` property points to the UIA element for the `label` element.</li> | ||
<li>Elements mapped to the `Text` Control Type are not generally represented as <a class="termref" data-lt="accessible object">accessible objects</a> in the <a class="termref">accessibility tree</a>, but are just part of the `Text` Control Pattern implemented for the whole HTML document. However, if they have any `aria-` attributes or an explicit `tabindex` specified, elements mapped to the `Text` Control Type will be represented as <a class="termref" data-lt="accessible object">accessible objects</a> in the <a class="termref">accessibility tree</a>.</li> | ||
</ul> | ||
the element either has no implicit WAI-ARIA role or platform role mappings, or it has an implicit `generic` or `none` role mapping, | ||
</li> | ||
<li> | ||
<strong>AXAPI:</strong> | ||
<ul> | ||
<li>User agents should return a user-presentable, localized string value for the Mac Accessibility AXRoleDescription.</li> | ||
</ul> | ||
and the author has specified attributes which require a minimum role mapping for the element. | ||
</li> | ||
</ul> | ||
<p> | ||
The <a href="#attribute-mapping-table">Mappings of HTML attributes table</a> identifies the specific global attributes which would require | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
an element map to a minimum role. | ||
</p> | ||
<p> | ||
When these conditions are met, the browser MUST expose an object using the mappings defined in CORE-AAM for the specified minimum role. | ||
If the element has multiple attributes specified which require a minimum role be exposed, prioritize the more specific role in the ARIA taxonomy. | ||
</p> | ||
</section> | ||
<section> | ||
<h3>HTML Element Role Mappings</h3> | ||
<ul> | ||
<li>HTML elements with implicit WAI-ARIA role semantics MUST be mapped to platform <a class="termref">accessibility APIs</a> according to the identified WAI-ARIA role mapping as defined in the [[core-aam-1.2]] specification.</li> | ||
<li>"Not mapped" means the element is not exposed via an <a class="termref">accessibility API</a>. Commonly, an element is not mapped because it's not displayed as part of the user interface. However, authors can force some of these elements to be rendered. For instance, by overriding user agent styles to render elements that would have been otherwise set to `display: none`. In these cases, the user agent SHOULD map such elements to the role of <a class="core-mapping" href="#role-map-generic">`generic`</a>, unless other HTML features have been specified which would require a more specific <a>minimum role</a> to be exposed.</li> | ||
<li>Where an element is indicated as having <q>No corresponding (WAI-ARIA) role</q>, or is mapped to the <a class="core-mapping" href="#role-map-generic">`generic`</a> role, user agents MUST NOT expose the <a class="core-mapping" href="#ariaRoleDescription">`aria-roledescription`</a> property value in the <a class="termref">accessibility tree</a> unless the element has an explicit, conforming `role` attribute value for which [[WAI-ARIA-1.2]] does not prohibit the use of `aria-roledescription`.</li> | ||
<li>Some HTML elements expose implicit WAI-ARIA roles depending on whether they have been provided an <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>. How an element participates in the computation of its own or another element's <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> and/or <a data-cite="accname-1.2/#dfn-accessible-description">accessible description</a> is described in the <a href="#accessible-name-and-description-computation">Accessible Name and Description Computation</a> section of this document.</li> | ||
</ul> | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<section> | ||
<h4 id="platform-api-mapping-requirements">Platform API mapping requirements</h4> | ||
<ul> | ||
<li> | ||
<strong>IAccessible2:</strong> | ||
<ul> | ||
<li>All elements with accessible objects SHOULD implement the IAccessible, IAccessible2 and IAccessible2_2 interfaces.</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<strong>UIA:</strong> | ||
<ul> | ||
<li>When a <a data-cite="html/forms.html#category-label">labelable element</a> is referenced by a `label` element's `for` attribute, or a descendant of a `label` element, the labelable element's UIA `LabeledBy` property points to the UIA element for the `label` element.</li> | ||
<li>Elements mapped to the `Text` Control Type are not generally represented as <a class="termref" data-lt="accessible object">accessible objects</a> in the <a class="termref">accessibility tree</a>, but are just part of the `Text` Control Pattern implemented for the whole HTML document. However, if they have any `aria-` attributes or an explicit `tabindex` specified, elements mapped to the `Text` Control Type will be represented as <a class="termref" data-lt="accessible object">accessible objects</a> in the <a class="termref">accessibility tree</a>.</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<strong>AXAPI:</strong> | ||
<ul> | ||
<li>User agents should return a user-presentable, localized string value for the Mac Accessibility AXRoleDescription.</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</section> | ||
<div class="table-container"> | ||
<table class="map-table elements" id="element-mapping-table"> | ||
<caption>Mappings of HTML elements to platform <a class="termref">accessibility APIs</a>: ARIA, MSAA + UIA Express, MSAA + IAccessible2, UIA, ATK, and AX</caption> | ||
|
@@ -3317,7 +3353,9 @@ <h3>HTML Attribute State and Property Mappings</h3> | |
</div> | ||
</td> | ||
<td class="ax">`AXAccessKey: <value>`</td> | ||
<td class="comments"></td> | ||
<td class="comments"> | ||
Provides a <a href="termref">minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>. | ||
</td> | ||
</tr> | ||
<tr tabindex="-1" id="att-action"> | ||
<th>`action`</th> | ||
|
@@ -3492,7 +3530,7 @@ <h3>HTML Attribute State and Property Mappings</h3> | |
<td class="atk"><div class="general">Not mapped</div></td> | ||
<td class="ax"><div class="general">Not mapped</div></td> | ||
<td class="comments"> | ||
<p>Similar to <a class="core-mapping" href="#ariaFlowto">`aria-flowto`</a>.</p> | ||
Provides a <a href="termref">minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>. | ||
</td> | ||
</tr> | ||
<tr tabindex="-1" id="att-autoplay"> | ||
|
@@ -3646,7 +3684,7 @@ <h3>HTML Attribute State and Property Mappings</h3> | |
<td class="elements"> | ||
<a data-cite="html/interaction.html#attr-contenteditable">HTML elements</a> | ||
</td> | ||
<td class="aria">?</td> | ||
<td class="aria">Not Mapped</td> | ||
<td class="ia2"> | ||
<div class="states"> | ||
<span class="type">States:</span> | ||
|
@@ -3678,7 +3716,8 @@ <h3>HTML Attribute State and Property Mappings</h3> | |
<div class="general">Use WAI-ARIA mapping</div> | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</td> | ||
<td class="comments"> | ||
If the element has the `contenteditable` attribute and `aria-readonly="true"`, User Agents MUST expose only the `contenteditable` state. | ||
<p>If the element has the `contenteditable` attribute and `aria-readonly="true"`, User Agents MUST expose only the `contenteditable` state.</p> | ||
<!-- note: when/if contenteditable=plaintext-only becomes a standard, then this would have a minimum mapping of textbox --> | ||
</td> | ||
</tr> | ||
<tr tabindex="-1" id="att-controls"> | ||
|
@@ -3970,7 +4009,9 @@ <h3>HTML Attribute State and Property Mappings</h3> | |
</div> | ||
</td> | ||
<td class="ax"><div class="general">Not mapped</div></td> | ||
<td class="comments"></td> | ||
<td class="comments"> | ||
Provides a <a href="termref">minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>. | ||
</td> | ||
</tr> | ||
<tr tabindex="-1" id="att-enctype"> | ||
<th>`enctype`</th> | ||
|
@@ -5451,7 +5492,9 @@ <h3>HTML Attribute State and Property Mappings</h3> | |
<td class="uia"><div class="general">Use WAI-ARIA mapping</div></td> | ||
<td class="atk"><div class="general">Use WAI-ARIA mapping</div></td> | ||
<td class="ax"><div class="general">Use WAI-ARIA mapping</div></td> | ||
<td class="comments"></td> | ||
<td class="comments"> | ||
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. Now that Hunseop Jeong has implemented this in https://chromium-review.googlesource.com/c/chromium/src/+/4794310 I have questions, because I realize we used to repair nameless occurances of
Should we care about that? 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. Firefox doesn't seem to add name from content to which matches the ARIA spec regarding generic role. I think having the behavior match for Chrome and Firefox will be a positive.
For JAWS, this change will cause JAWS to announce "group" on focus, but I thihnk that is fine. In addition, if chrome no longer adds name from content to generic elements, the cases where focus moves inside these generic elements with names will be less chatty. 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. there are kinda two different cases that should be considered here. a generic element with a tabindex so that it's focusable or in the tab order. those fit under what brett mentioned. then there are the generic elements with a tabindex which also have a click/some-kind-of event attached. and those are more likely to be things where maybe the name should be calculated to make up for the likely faux buttons being made (not saying they 'should' be buttons. we don't know...) 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 suppose even without any changes to this PR, the fake So my next question is whether should get the minimum group role, or whether we should just leave those alone.
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'd still say group. any more than that would make a lot of assumptions that could make the content more difficult to read / could still be wrong in terms of the role. e.g., maybe it's supposed to be a link. maybe it's not really supposed to be either... so stay with group to keep a consistent baseline |
||
Provides a <a href="termref">minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</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. Hmm, I think we should only do this for tabindex=0. If we do it for tabindex=-1, it might create a lot of noise on web pages where tabindex=-1 is put on random elements for hard-to-explain reasons. We ran into this when we used to repair missing names on |
||
</td> | ||
</tr> | ||
<tr tabindex="-1" id="att-target"> | ||
<th>`target`</th> | ||
|
Uh oh!
There was an error while loading. Please reload this page.