Skip to content
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

Change figure & figcaption accName computation #359

Open
wants to merge 23 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
941668e
Change figure & figcaption accName computation
scottaohara Jan 20, 2022
c1f0436
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jan 20, 2022
472d40e
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Feb 7, 2022
0a0f361
resolve review comments
scottaohara Feb 7, 2022
8d36f54
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Apr 4, 2022
8e3e598
indicate figcaption maps to caption
scottaohara Apr 29, 2022
8841502
add in AX details for figure's relationship to figcaption
scottaohara Apr 29, 2022
295f94b
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Apr 29, 2022
4bae8c9
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jun 6, 2022
eee657b
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jul 9, 2022
4471139
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Oct 14, 2022
a8a4c01
finish up mapping detials
scottaohara May 3, 2023
f22b76b
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara May 3, 2023
1108f16
attempt to fix build error
scottaohara May 3, 2023
6fa6be7
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara May 3, 2023
db3e5b7
fix the broken accname/desc references
scottaohara May 3, 2023
82af13a
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara May 3, 2023
3fd830d
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jun 4, 2023
2339df0
add comment regarding aria-details
scottaohara Jun 4, 2023
7263462
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Oct 25, 2023
7839c03
update based on review suggestions
scottaohara Nov 22, 2023
9a81370
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Nov 22, 2023
2380d76
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 48 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2180,58 +2180,57 @@ <h4 id=el-figcaption>`figcaption`</h4>
<tr>
<th>[[wai-aria-1.2]]</th>
<td>
No corresponding role
<a class="core-mapping" href="#role-map-caption">`caption`</a> role
</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="role">
<span class="type">Roles:</span> `ROLE_SYSTEM_TEXT`; `IA2_ROLE_CAPTION`
<span class="type">Role:</span> Use WAI-ARIA mapping
</div>
<div class="relations">
<span class="type">Relations:</span> `IA2_RELATION_LABEL_FOR` with parent <a href="#el-figure">`figure`</a> element
<span class="type">Relations:</span>
If the first instance of a child `figcaption` to its parent <a href="#el-figure">`figure`</a>, then `IA2_RELATION_DETAILS_FOR` with parent `figure`.
</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="ctrltype">
<span class="type">Control Type:</span> `Text`
<span class="type">Role:</span> Use WAI-ARIA mapping
</div>
</td>
</tr>
<tr>
<th><a href="https://gnome.pages.gitlab.gnome.org/atk/">ATK</a></th>
<td>
<div class="role">
<span class="type">Role:</span> `ATK_ROLE_CAPTION`
<span class="type">Role:</span> Use WAI-ARIA mapping
</div>
<div class="relations">
<span class="type">Relations:</span>
`ATK_RELATION_LABEL_FOR` with parent <a href="#el-figure">`figure`</a> element
If this is the first instance of a child `figcaption` to its parent <a href="#el-figure">`figure`</a> element,
then expose `RELATION_DETAILS_FOR` referencing the parent `figure` element.
</div>
</td>
</tr>
<tr>
<th><a href="https://developer.apple.com/reference/appkit/nsaccessibility">AX</a></th>
<td>
<div class="role">
<span class="type">AXRole:</span> `AXGroup`
</div>
<div class="subrole">
<span class="type">AXSubrole:</span> `(nil)`
</div>
<div class="roledesc">
<span class="type">AXRoleDescription:</span> `"group"`
<span class="type">Role:</span> Use WAI-ARIA mapping
</div>
</td>
</tr>
<!-- <th><a href="#accessible-name-and-description-computation">Naming Algorithm</a></th> -->
<tr>
<th>Comments</th>
<td>
<p>
Only the first child instance of a <a href="#el-figcaption">`figcaption`</a> element that is present in the accessibility tree (e.g., not 'hidden')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For figure, we're explicit that aria-labelledby, aria-describedby or aria-details prevent exposure of the details relation. However, we're not similarly explicit here for the reverse relation. Common sense will hopefully prevail, but I don't love relying on common sense for a spec. Is there something I'm missing that would otherwise make this explicit?

This is a similar situation to https://github.com/w3c/html-aam/pull/481/files#r1424943049. It seems we tend to use ARIA to express roles in a cross-platform manner wherever possible now, but we don't do that for relations, I guess largely because reverse relations and the details-roles attribute complicate things.

provides details for its parent `figure` element.</p>
</td>
</tr>
</tbody>
Expand All @@ -2258,7 +2257,9 @@ <h4 id=el-figure>`figure`</h4>
<span class="type">Role:</span> Use WAI-ARIA mapping
</div>
<div class="relations">
<span class="type">Relations:</span> `IA2_RELATION_LABELLED_BY` with child <a href="#el-figcaption">`figcaption`</a> element
<span class="type">Relations:</span>
`IA2_RELATION_DETAILS` points to the first instance of a child `figcaption` if the element is present in the accessibility tree of the
parent `figure` element.
</div>
</td>
</tr>
Expand All @@ -2268,8 +2269,10 @@ <h4 id=el-figure>`figure`</h4>
<div class="role">
<span class="type">Role:</span> Use WAI-ARIA mapping
</div>
<div class="general">
Accessible name derived from `figcaption` according to the <a href="#figure-element-accessible-name-computation">`figure` Element Accessible Name Computation</a>
<div class="property">
<span class="type">Property:</span>
`DescribedBy` references the first instance of a child `figcaption` element if the element is present in the accessibility tree
of the parent `figure` element.
</div>
</td>
</tr>
Expand All @@ -2283,7 +2286,9 @@ <h4 id=el-figure>`figure`</h4>
<span class="type">Name:</span> related <a href="#el-figcaption">`figcaption`</a> content
</div>
<div class="relations">
<span class="type">Relations:</span> `ATK_RELATION_LABELLED_BY` with child <a href="#el-figcaption">`figcaption`</a> element
<span class="type">Relations:</span>
`RELATION_DETAILS` references the first instance of a child `figcaption` element if the element is present in the accessibility tree
of the parent `figure` element.
</div>
</td>
</tr>
Expand All @@ -2293,12 +2298,25 @@ <h4 id=el-figure>`figure`</h4>
<div class="role">
<span class="type">AXRole:</span> Use WAI-ARIA mapping
</div>
<div class="relations">
<span class="type">Property:</span>
`AXDetailsElements` references the first instance of a child `figcaption` element if the element is present in the accessibility tree
of the parent `figure` element.
</div>
</td>
</tr>
<!-- <th><a href="#accessible-name-and-description-computation">Naming Algorithm</a></th> -->
<tr>
<th>Comments</th>
<td>
<p>
If an author specifies a `figure` element to acquire its accessible name or description from the first instance
of a child `figcaption` element via an `aria-labelledby` or `aria-describedby` association, then user agents SHOULD NOT expose a
details relationship between the parent `figure` and child `figcaption` elements.</p>
<p>
An explicit declaration of the `aria-details` attribute on the `figure` element will override the implicit `aria-details`
association with the element's child `figcaption` element, if one exists. If the `aria-details` attribute has an empty value,
then the `figure` element has no details relation to expose.</p>
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -16453,17 +16471,25 @@ <h4>`summary` Element Accessible Name Computation</h4>
</section>
<section>
<h4>`figure` Element Accessible Name Computation</h4>
<p>
A <a href="#el-figcaption">`figcaption`</a> provides additional details related to its parent
scottaohara marked this conversation as resolved.
Show resolved Hide resolved
<a href="#el-figure">`figure`</a> element. A `figcaption` does not take part in the
<a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> or <a data-cite="accname-1.2/#dfn-accessible-description">accessible description</a>
computation, unless explicitly referenced by an author.
</p>
<p>
When an author uses `aria-labelledby` or `aria-describedby` to reference the first child `figcaption` element from the parent `figure` element,
user agents SHOULD NOT expose the details relationship between the `figure` and `figcaption` elements, and instead expose the `figcaption` as the element's accessible name or description,
according to the following steps</a>.
</p>
<ol>
<li>
If the `figure` element has an <a data-cite="wai-aria-1.2/#aria-label">`aria-label`</a> or an <a data-cite="wai-aria-1.2/#aria-labelledby">`aria-labelledby`</a> attribute the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is to be calculated using the algorithm defined in <a href="" class="accname">Accessible Name and Description: Computation and API Mappings</a>.
</li>
<li>
If the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is still empty, then: if the `figure` element has a <a href="https://dom.spec.whatwg.org/#concept-tree-child">child</a> that is a `figcaption` element, then use the subtree of the first such element.
Otherwise, use the `title` attribute.
</li>
<li>
If the <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a> is still empty, then: if the `figure` element has a `title` attribute, then use that attribute.
</li>
<li>Otherwise, there is no <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>.</li>
<li>If none of the above yield a usable text string there is no <a data-cite="accname-1.2/#dfn-accessible-name">accessible name</a>.</li>
</ol>
</section>
<section>
Expand Down
Loading