Bug 264437 - AX: Caption and figure caption elements are ignored.
Summary: AX: Caption and figure caption elements are ignored.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-08 14:12 PST by Andres Gonzalez
Modified: 2023-11-09 11:30 PST (History)
10 users (show)

See Also:


Attachments
Patch (13.85 KB, patch)
2023-11-08 14:16 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (14.53 KB, patch)
2023-11-08 17:20 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gonzalez 2023-11-08 14:12:56 PST
.
Comment 1 Radar WebKit Bug Importer 2023-11-08 14:13:18 PST
<rdar://problem/118139030>
Comment 2 Andres Gonzalez 2023-11-08 14:16:50 PST
Created attachment 468521 [details]
Patch
Comment 3 Tyler Wilcock 2023-11-08 15:28:36 PST
Comment on attachment 468521 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=468521&action=review

> Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:-141
> -    if (roleValue() == AccessibilityRole::Caption && ariaRoleAttribute() == AccessibilityRole::Unknown)
> -        return AccessibilityObjectInclusion::IgnoreObject;

I assume this was ignored because the caption text is exposed automatically by moving focus to the table. By preventing it from being ignored, will there now be an extra stop that causes ATs like VoiceOver to speak the caption twice — once for the table, and once when focus moves to the caption? I'm less familiar with figcaption, but I have to imagine the idea was the same.
Comment 4 Andres Gonzalez 2023-11-08 16:39:48 PST
(In reply to Tyler Wilcock from comment #3)
> Comment on attachment 468521 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=468521&action=review
> 
> > Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:-141
> > -    if (roleValue() == AccessibilityRole::Caption && ariaRoleAttribute() == AccessibilityRole::Unknown)
> > -        return AccessibilityObjectInclusion::IgnoreObject;
> 
> I assume this was ignored because the caption text is exposed automatically
> by moving focus to the table. By preventing it from being ignored, will
> there now be an extra stop that causes ATs like VoiceOver to speak the
> caption twice — once for the table, and once when focus moves to the
> caption? I'm less familiar with figcaption, but I have to imagine the idea
> was the same.

No, VO doesn't have an extra VO + arrow stop in table captions with this change.
Comment 5 Andres Gonzalez 2023-11-08 17:20:31 PST
Created attachment 468527 [details]
Patch

Updating test expectation for WK1
Comment 6 EWS 2023-11-09 11:30:17 PST
Committed 270467@main (30503bbfeadf): <https://commits.webkit.org/270467@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 468527 [details].