[webkit-changes] [WebKit/WebKit] a10549: AX: AccessibilityTableCell::parentTable() can erro...

Tyler Wilcock noreply at github.com
Wed Mar 27 15:09:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a10549d8d1430a2e195f68e6b035dc6f695adaaa
      https://github.com/WebKit/WebKit/commit/a10549d8d1430a2e195f68e6b035dc6f695adaaa
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-display/accessibility/display-contents-role-and-label-expected.txt
    M LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-display/accessibility/display-contents-role-and-label-expected.txt
    M Source/WebCore/accessibility/AccessibilityTableCell.cpp

  Log Message:
  -----------
  AX: AccessibilityTableCell::parentTable() can erroneously return nullptr when inside table with non-default CSS display
https://bugs.webkit.org/show_bug.cgi?id=271763
rdar://problem/125489146

Reviewed by Chris Fleizach.

Prior to this patch, if AccessibilityTableCell was created with a
RenderTableCell, it relies solely on the render tree to get the parent
table (RenderTableCell::table()).

This can fail if the table has a non-default CSS display value, e.g.
display:flex, in turn causing AccessibilityTableCell::parentTable to
return nullptr, despite the fact that it actually does have a table role
ancestor.

In turn, this can cause the cells to fail to be exposed with a role of table cell,
breaking the table structure for ATs.

With this patch, AccessibilityTableCell::parentTable is now more
resilient, relying on an AX ancestry walk to find a table / grid
ancestor if the render tree mechanism fails.

This allows us to pass 5 more WPT subtests in display-contents-role-and-label.html.

* LayoutTests/imported/w3c/web-platform-tests/css/css-display/accessibility/display-contents-role-and-label-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-display/accessibility/display-contents-role-and-label-expected.txt:
* Source/WebCore/accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable const):

Canonical link: https://commits.webkit.org/276757@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