[webkit-changes] [WebKit/WebKit] d7e205: AX: Tables with show/hide rows report wrong counts...

Tyler Wilcock noreply at github.com
Tue Aug 13 07:53:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d7e2051a1f93411408b07b03934a87e957ff0b4f
      https://github.com/WebKit/WebKit/commit/d7e2051a1f93411408b07b03934a87e957ff0b4f
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2024-08-13 (Tue, 13 Aug 2024)

  Changed paths:
    A LayoutTests/accessibility/aria-controlled-table-row-visibility-expected.txt
    A LayoutTests/accessibility/aria-controlled-table-row-visibility.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/ios/TestExpectations
    A LayoutTests/platform/ios/accessibility/aria-controlled-table-row-visibility-expected.txt
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/WebCore/accessibility/AccessibilityTableRow.cpp

  Log Message:
  -----------
  AX: Tables with show/hide rows report wrong counts and block access to some rows in VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=275366
rdar://129612387

Reviewed by Chris Fleizach.

This happened because fundamentally, `AccessibilityTableRow::computeAccessibilityIsIgnored` did not
respect hidden states at all (https://www.w3.org/TR/wai-aria/#dfn-hidden — display:none or visibility:hidden).
We only got away with it for so long because `AXObjectCache::getOrCreate(Node& node, IsPartOfRelation isPartOfRelation)`
limits the types of objects that can be created without a renderer, effectively blocking these hidden objects. Except
it unconditionally creates objects that are part of a relantionship (like `aria-controls`):

```
// If node is the target of a relationship or a descendant of one, create an AX object unconditionally.
if (isPartOfRelation == IsPartOfRelation::No && !isDescendantOfRelatedNode(node)) {
    ...strict criteria to create a renderer-less object...
}
```

After this commit, `AccessibilityTableRow::computeAccessibilityIsIgnored` now properly respects hidden status, fixing
the bug.

* LayoutTests/accessibility/aria-controlled-table-row-visibility-expected.txt: Added.
* LayoutTests/accessibility/aria-controlled-table-row-visibility.html: Added.
* LayoutTests/platform/ios/TestExpectations: Enable new test.
* LayoutTests/platform/ios/accessibility/aria-controlled-table-row-visibility-expected.txt: Added.
* LayoutTests/platform/mac-wk1/TestExpectations: Skip new test.
* Source/WebCore/accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::computeAccessibilityIsIgnored const):

Canonical link: https://commits.webkit.org/282165@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list