Bug 261376 - AX: No accessibility label is exposed for display:contents role="treeitem" elements that have a newline before their child text
Summary: AX: No accessibility label is exposed for display:contents role="treeitem" el...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-09-09 13:26 PDT by Tyler Wilcock
Modified: 2023-09-10 00:14 PDT (History)
10 users (show)

See Also:


Attachments
Patch (9.43 KB, patch)
2023-09-09 13:33 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (9.64 KB, patch)
2023-09-09 14:24 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (9.61 KB, patch)
2023-09-09 14:30 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (9.61 KB, patch)
2023-09-09 14:31 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (9.66 KB, patch)
2023-09-09 17:46 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2023-09-09 13:26:43 PDT
...
Comment 1 Radar WebKit Bug Importer 2023-09-09 13:26:55 PDT
<rdar://problem/115226509>
Comment 2 Tyler Wilcock 2023-09-09 13:33:31 PDT
Created attachment 467622 [details]
Patch
Comment 3 Tyler Wilcock 2023-09-09 13:36:29 PDT
Comment on attachment 467622 [details]
Patch

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

> LayoutTests/accessibility/display-contents/tree-and-treeitems-expected.txt:14
> +	AXDescription: Animals

Prior to this patch, this description was blank.

> LayoutTests/accessibility/display-contents/tree-and-treeitems-expected.txt:25
> +	AXDescription: Birds

Prior to this patch, this description was "Birds Cats", even though "Cats" is the text under an entirely different element.
Comment 4 chris fleizach 2023-09-09 14:04:26 PDT
Comment on attachment 467622 [details]
Patch

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

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:2392
> +        if (childParentElement && is<Element>(node) && childParentElement != node)

does it matter that node is an Element at this place?
Comment 5 Tyler Wilcock 2023-09-09 14:24:09 PDT
Created attachment 467623 [details]
Patch
Comment 6 Tyler Wilcock 2023-09-09 14:24:59 PDT
(In reply to chris fleizach from comment #4)
> Comment on attachment 467622 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=467622&action=review
> 
> > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:2392
> > +        if (childParentElement && is<Element>(node) && childParentElement != node)
> 
> does it matter that node is an Element at this place?
Fixed!
Comment 7 Tyler Wilcock 2023-09-09 14:30:41 PDT
Created attachment 467624 [details]
Patch
Comment 8 Tyler Wilcock 2023-09-09 14:31:59 PDT
Created attachment 467625 [details]
Patch
Comment 9 Tyler Wilcock 2023-09-09 17:46:36 PDT
Created attachment 467627 [details]
Patch
Comment 10 EWS 2023-09-10 00:14:18 PDT
Committed 267839@main (6d76fb13fc78): <https://commits.webkit.org/267839@main>

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