Bug 261376

Summary: AX: No accessibility label is exposed for display:contents role="treeitem" elements that have a newline before their child text
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

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].