WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
252941
AX: Adding display:block to table rows inside a header makes the entire table inaccessible
https://bugs.webkit.org/show_bug.cgi?id=252941
Summary
AX: Adding display:block to table rows inside a header makes the entire table...
Tyler Wilcock
Reported
2023-02-24 19:43:52 PST
Adding display:block to table rows inside a header makes the entire table inaccessible.
Attachments
Patch
(7.08 KB, patch)
2023-02-24 20:12 PST
,
Tyler Wilcock
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-02-24 19:44:04 PST
<
rdar://problem/105912396
>
Tyler Wilcock
Comment 2
2023-02-24 20:12:20 PST
Created
attachment 465165
[details]
Patch
chris fleizach
Comment 3
2023-02-24 21:06:52 PST
Comment on
attachment 465165
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=465165&action=review
> Source/WebCore/accessibility/AccessibilityTableRow.cpp:114 > + while (isAnonymousTablePart(parent))
Is there a chance patent becomes nil and we loop forever
> Source/WebCore/accessibility/AccessibilityTableRow.cpp:116 > + return parent;
Do we need to implement this in parent object unignored if we’re already doing it in parent object ?
Andres Gonzalez
Comment 4
2023-02-27 05:57:08 PST
(In reply to Tyler Wilcock from
comment #2
)
> Created
attachment 465165
[details]
> Patch
"Because no `AXIsolatedObject` was created for these anonymous renderers (as expected), `AXIsolatedTree::nodeForID` failed, breaking the tree hierarchy." Why it is expected that no isolated object is created for an anonymous renderer. Because it is ignored? If so, that's the actual cause of the problem. --- a/Source/WebCore/accessibility/AccessibilityTableRow.cpp +++ b/Source/WebCore/accessibility/AccessibilityTableRow.cpp @@ -90,7 +90,32 @@ bool AccessibilityTableRow::computeAccessibilityIsIgnored() const return false; } - + +static bool isAnonymousTablePart(AccessibilityObject* axObject) +{ + if (auto* renderer = axObject ? axObject->renderer() : nullptr) + return renderer->isAnonymous() && renderer->isTablePart(); + return false; +} + +AccessibilityObject* AccessibilityTableRow::parentObject() const +{ + auto* parent = AccessibilityRenderObject::parentObject(); + // For some combinations of display values given to <tr> / <tbody>, anonymous table rows / cells + // can end up parenting non-anonymous table rows in the render tree. Skip past these. + while (isAnonymousTablePart(parent)) + parent = parent->parentObject(); + return parent; +} + Can we make isAnonymousTablePart() an AccessibilityObject or AccessibilityRenderObject method instead? +AccessibilityObject* AccessibilityTableRow::parentObjectUnignored() const +{ + auto* parent = AccessibilityRenderObject::parentObjectUnignored(); + while (isAnonymousTablePart(parent)) + parent = parent->parentObjectUnignored(); + return parent; +} + We shouldn't need to override parentObjectUnignored since it is a composite of parentObject and isIgnored.
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