WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
255325
AX: Properly expose lists that have display:contents list items
https://bugs.webkit.org/show_bug.cgi?id=255325
Summary
AX: Properly expose lists that have display:contents list items
Tyler Wilcock
Reported
2023-04-12 00:14:06 PDT
<div role="list" id="list"> <li id="li1" style="display:contents">One</li> <li id="li2"style="display:contents">Two</li> </div> We don't expose this as a list which is wrong.
Attachments
Patch
(18.59 KB, patch)
2023-04-12 00:21 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(19.10 KB, patch)
2023-04-12 09:59 PDT
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-04-12 00:14:18 PDT
<
rdar://problem/107924637
>
Tyler Wilcock
Comment 2
2023-04-12 00:21:07 PDT
Created
attachment 465862
[details]
Patch
Andres Gonzalez
Comment 3
2023-04-12 07:26:28 PDT
(In reply to Tyler Wilcock from
comment #2
)
> Created
attachment 465862
[details]
> Patch
--- a/Source/WebCore/accessibility/AXObjectCache.cpp +++ b/Source/WebCore/accessibility/AXObjectCache.cpp - RefPtr<AccessibilityObject> newObj = createFromNode(node); + RefPtr<AccessibilityObject> newObj = createFromNode(*node); RefPtr<AccessibilityObject> newObj --> RefPtr newObject + if (auto* node = this->node()) + return node->hasTagName(ulTag); + return false; I prefer the two liner idiom: auto* node = this->node(); return node ? node->hasTagName(ulTag) : false; + if (auto* node = this->node()) + return node->hasTagName(olTag); + return false; Same as above. + if (auto* node = this->node()) + return node->hasTagName(dlTag); + return false; Same as above. else if (child->roleValue() == AccessibilityRole::ListItem) { - RenderObject* listItem = child->renderer(); - if (!listItem) - continue; - // Rendered list items always count. Does this comment make sense any more?
Tyler Wilcock
Comment 4
2023-04-12 09:59:59 PDT
Created
attachment 465868
[details]
Patch
Tyler Wilcock
Comment 5
2023-04-12 10:01:29 PDT
> else if (child->roleValue() == AccessibilityRole::ListItem) { > - RenderObject* listItem = child->renderer(); > - if (!listItem) > - continue; > - > // Rendered list items always count. > Does this comment make sense any more?
Just re-read the function and I think it still does since the purpose of the if-statement is to find rendered list items. Fixed all other comments, thanks!
EWS
Comment 6
2023-04-12 15:13:34 PDT
Committed
262889@main
(f49113b35bbd): <
https://commits.webkit.org/262889@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 465868
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug