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

[html-aam PR 359] Change figure & figcaption accName computation #2224

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
57dea71
Change figure & figcaption accName computation
scottaohara Jan 20, 2022
c247994
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jan 20, 2022
2cece28
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Feb 7, 2022
23f6eaa
resolve review comments
scottaohara Feb 7, 2022
ada36a3
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Apr 4, 2022
ec8d7de
indicate figcaption maps to caption
scottaohara Apr 29, 2022
1a6f853
add in AX details for figure's relationship to figcaption
scottaohara Apr 29, 2022
379bca2
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Apr 29, 2022
08499c6
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jun 6, 2022
a2abcc5
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jul 9, 2022
1cb01c6
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Oct 14, 2022
be53256
finish up mapping detials
scottaohara May 3, 2023
9c8ad35
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara May 3, 2023
0b40395
attempt to fix build error
scottaohara May 3, 2023
991db53
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara May 3, 2023
d25c1ee
fix the broken accname/desc references
scottaohara May 3, 2023
0fe3c0b
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara May 3, 2023
ddc6a42
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Jun 4, 2023
69aca1e
add comment regarding aria-details
scottaohara Jun 4, 2023
c8c6aa8
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Oct 25, 2023
a50948b
update based on review suggestions
scottaohara Nov 22, 2023
2d1da27
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Nov 22, 2023
da867eb
Merge branch 'gh-pages' into figure-figcaption-revision
scottaohara Dec 13, 2023
643fdec
editorial: move html-aam PR359
pkra May 24, 2024
f7af218
remove details relations for figure/figcaption
scottaohara Sep 27, 2024
37d9ea8
chore: prettier
scottaohara Sep 27, 2024
5bf314d
further removals
scottaohara Sep 27, 2024
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
36 changes: 12 additions & 24 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ <h4 id="el-figcaption">`figcaption`</h4>
</tr>
<tr>
<th>[[wai-aria-1.2]]</th>
<td><a class="core-mapping" href="#role-map-group">`caption`</a> role</td>
<td><a class="core-mapping" href="#role-map-caption">`caption`</a> role</td>
</tr>
<tr>
<th><a data-cite="core-aam-1.2/#roleMappingComputedRole">Computed Role</a></th>
Expand All @@ -2251,32 +2251,25 @@ <h4 id="el-figcaption">`figcaption`</h4>
<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`</div>
<div class="relations"><span class="type">Relations:</span> `IA2_RELATION_LABEL_FOR` with parent <a href="#el-figure">`figure`</a> element</div>
<div class="role"><span class="type">Role:</span> 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="ctrltype"><span class="type">Control Type:</span> `Text`</div>
<div class="ctrltype"><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`</div>
<div class="relations">
<span class="type">Relations:</span>
`ATK_RELATION_LABEL_FOR` with parent <a href="#el-figure">`figure`</a> element
</div>
<div class="role"><span class="type">Role:</span> Use WAI-ARIA mapping</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"`</div>
<div class="role"><span class="type">Role:</span> Use WAI-ARIA mapping</div>
</td>
</tr>
<!-- <th><a href="#accessible-name-and-description-computation">Naming Algorithm</a></th> -->
Expand Down Expand Up @@ -2309,24 +2302,18 @@ <h4 id="el-figure">`figure`</h4>
</th>
<td>
<div class="role"><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</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="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>
Comment on lines -2319 to -2321
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I missed this...

removes figcaption from the name calculation steps in that section of the spec, and explicitly states in that section that figcaption does not contribute to name or description unless specified by the author (e.g., via aria)

What's the reason for this removal? WebKit and Safari implementations agree on using figcaption as the name if none other is provided via ARIA. Seems logical to me to keep this.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, that's a good example

Copy link
Contributor

@cookiecrook cookiecrook Dec 13, 2024

Choose a reason for hiding this comment

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

Scott and I chatted, and are working on a update that will account for this HTML text:

  1. If the image is a descendant of a figure element that has a child figcaption element, and, ignoring the figcaption element and its descendants, the figure element has no flow content descendants other than inter-element whitespace and the img element, then return the contents of the first such figcaption element.

</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> Use WAI-ARIA mapping</div>
<div class="name"><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</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -15975,18 +15962,19 @@ <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 information related to its parent <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>
<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.
</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>Otherwise, use the `title` attribute.</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