Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1a83a57c9017d2ee5639862bbd64b8736fc44e79
      
https://github.com/WebKit/WebKit/commit/1a83a57c9017d2ee5639862bbd64b8736fc44e79
  Author: Tyler Wilcock <[email protected]>
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/html-aam/table-roles-expected.txt
    M Source/WebCore/accessibility/AccessibilityTableCell.cpp

  Log Message:
  -----------
  AX: The AX tree can be wrong if 
AccessibilityTableCell::determineAccessibilityRole() is called before parent 
table adds children
https://bugs.webkit.org/show_bug.cgi?id=273345
rdar://problem/127138437

Reviewed by Chris Fleizach.

AccessibilityTableCell::determineAccessibilityRole() calls rowIndexRange() and 
columnIndexRange(), which in turn
call ensureIndexesUpToDate(). This causes the parentTable() to addChildren(), 
which causes the rows to addChildren(),
then causing cells (including the one running determineAccessibilityRole() 
higher in the stack) to addChildren(). And
because the cell may not have ever set its m_role (i.e. making it 
AccessibilityRole::Unknown), it can be erroneously
ignored, causing the accessibility tree to be wrong.

Fix this by using SetForScope to set a temporary cell role to tide us over 
until the real role has been set.

Fixes one WPT subtest in html-aam/table-roles.html.

* LayoutTests/imported/w3c/web-platform-tests/html-aam/table-roles-expected.txt:
* Source/WebCore/accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
(WebCore::AccessibilityTableCell::isColumnHeader const):
(WebCore::AccessibilityTableCell::isRowHeader const):
Improve some naming and use RefPtr.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to