-
Notifications
You must be signed in to change notification settings - Fork 126
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
Update: change default role for custom elements #2383
base: main
Are you sure you want to change the base?
Changes from 15 commits
4fbb93f
8bde5fd
9e6c5b2
d1fffc8
a3ee851
584d952
88b0dc0
90cbd15
89b18fb
ec41dfc
07fa950
67ce536
b37c79b
691877f
85ec408
7232042
13b52fc
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 |
---|---|---|
|
@@ -226,7 +226,8 @@ <h3>HTML Element Role Mappings</h3> | |
specified which would require a more specific <a>minimum role</a> to be exposed. | ||
</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 | ||
Where an element is mapped to the <a class="core-mapping" href="#role-map-generic">`generic`</a> | ||
or <a class="core-mapping" href="#role-map-none">`none`</a> roles, 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> | ||
|
@@ -804,18 +805,35 @@ <h4 id="el-audio">`audio`</h4> | |
</tr> | ||
</tbody> | ||
</table> | ||
<h4 id="el-autonomous-custom-element">autonomous custom element</h4> | ||
<h4 id="el-autonomous-custom-element"> | ||
autonomous custom elements | ||
and | ||
<span id="el-form-associated-custom-element">form-associated custom elements</span> | ||
</h4> | ||
<table aria-labelledby="el-autonomous-custom-element"> | ||
<tbody> | ||
<tr> | ||
<th>HTML Specification</th> | ||
<td> | ||
<a data-cite="HTML">autonomous custom element</a> | ||
and | ||
<a data-cite="html/custom-elements.html#custom-elements-face-example">form-associated custom element</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>[[wai-aria-1.2]]</th> | ||
<td>If the author assigned a conforming ARIA role using the `role` attribute, map to that role. Otherwise, the <a class="core-mapping" href="#role-map-generic">`generic`</a> role.</td> | ||
<td> | ||
<ul> | ||
<li>If the author assigned a conforming role using the `role` attribute, or by the custom element's internals: map to the specified role.</li> | ||
<li>else if the author assigned HTML attributes that result in a <a>minimum role</a>: map to the minimum role.</li> | ||
<li>else if the custom element is focusable: map to the <a class="core-mapping" href="#role-map-generic">`group`</a> role</li> | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<li>else if an author specifies a global ARIA attribute on the custom element that creates a relation with another element: map to the <a class="core-mapping" href="#role-map-group">`group`</a> role</li> | ||
<li>else if the custom element has no attached shadow root: map to the <a class="core-mapping" href="#role-map-generic">`generic`</a> role</li> | ||
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. Does the 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. custom elements are currently generic, so even without this spec change, this use case doesn't work now. |
||
<li>else if the custom element has an `aria-live` attribute: map to the <a class="core-mapping" href="#role-map-generic">`generic`</a> role</li> | ||
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. Why generic? Could we map to unknown or something and log a warning? Generic-izing this element will have the side effect of making some other features not work unexpectedly. 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'm not sure i follow this or the next comment - since custom elements are presently generic anything that says to map this to generic is essentially keeping the status quo. |
||
<li>else if element internals are used to set a global ARIA property: map to the <a class="core-mapping" href="#role-map-generic">`generic`</a> role.</li> | ||
<li>Otherwise, the custom element maps to the <a class="core-mapping" href="#role-map-none">`none`</a> role.</li> | ||
</ul> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th><a data-cite="core-aam-1.2/#roleMappingComputedRole">Computed Role</a></th> | ||
|
@@ -2524,56 +2542,6 @@ <h4 id="el-form">`form`</h4> | |
</tr> | ||
</tbody> | ||
</table> | ||
<h4 id="el-form-associated-custom-element">form-associated custom element</h4> | ||
<table aria-labelledby="el-form-associated-custom-element"> | ||
<tbody> | ||
<tr> | ||
<th>HTML Specification</th> | ||
<td> | ||
<a data-cite="html/custom-elements.html#custom-elements-face-example">form-associated custom element</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th>[[wai-aria-1.2]]</th> | ||
<td>If the author assigned a conforming ARIA role using the `role` attribute, map to that role. Otherwise, the <a class="core-mapping" href="#role-map-generic">`generic`</a> role.</td> | ||
</tr> | ||
<tr> | ||
<th><a data-cite="core-aam-1.2/#roleMappingComputedRole">Computed Role</a></th> | ||
<td class="role-computed"><div class="general">Use WAI-ARIA mapping</div></td> | ||
</tr> | ||
<tr> | ||
<th> | ||
<a href="https://msdn.microsoft.com/en-us/library/dd373608%28v=VS.85%29.aspx">MSAA</a> + <a href="http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/">IAccessible2</a> | ||
</th> | ||
<td> | ||
<div class="general">Use WAI-ARIA mapping</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th><a href="https://msdn.microsoft.com/en-us/library/ms726297%28v=VS.85%29.aspx">UIA</a></th> | ||
<td> | ||
<div class="general">Use WAI-ARIA mapping</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th><a href="https://gnome.pages.gitlab.gnome.org/atk/">ATK</a></th> | ||
<td> | ||
<div class="general">Use WAI-ARIA mapping</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th><a href="https://developer.apple.com/reference/appkit/nsaccessibility">AX</a></th> | ||
<td> | ||
<div class="general">Use WAI-ARIA mapping</div> | ||
</td> | ||
</tr> | ||
<!-- <th><a href="#accessible-name-and-description-computation">Naming Algorithm</a></th> --> | ||
<tr> | ||
<th>Comments</th> | ||
<td></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<h4 id="el-h1-h6">`h1`, `h2`, `h3`, `h4`, `h5`, and `h6`</h4> | ||
<table aria-labelledby="el-h1-h6"> | ||
<tbody> | ||
|
@@ -8680,7 +8648,7 @@ <h4 id="att-autofocus">`autofocus`</h4> | |
</tr> | ||
<tr> | ||
<th>Comments</th> | ||
<td>Provides a <a href="termref">minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>.</td> | ||
<td>Provides a <a>minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>.</td> | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</tr> | ||
</tbody> | ||
</table> | ||
|
@@ -10171,7 +10139,7 @@ <h4 id="att-draggable">`draggable`</h4> | |
</tr> | ||
<tr> | ||
<th>Comments</th> | ||
<td>Provides a <a href="termref">minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>.</td> | ||
<td>Provides a <a>minimum role</a> of <a class="core-mapping" href="#role-map-group">`group`</a>.</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
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.
Why group? Could we map to unknown or something and log a warning?
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.
also this links to generic, not group
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.
that typo maight be easier to avoid using the respective
<rref>
tag...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.
fixed the incorrect link. i never thought to use rref in html aam - wasn't sure that'd work. i don't see that used in core aam either.
maybe it'd work now with the specs all in one repo?
re: about mapping to group or something else - i'm open to ideas. cc @aleventhal if you have thoughts?