[webkit-changes] [WebKit/WebKit] 96801f: AX: Invalid summary elements should not be exposed...
Tyler Wilcock
noreply at github.com
Mon Feb 20 10:27:54 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 96801f719dfcc8d443613ff0e236442d3017e7f8
https://github.com/WebKit/WebKit/commit/96801f719dfcc8d443613ff0e236442d3017e7f8
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-02-20 (Mon, 20 Feb 2023)
Changed paths:
A LayoutTests/accessibility/mac/invalid-summary-element-expected.txt
A LayoutTests/accessibility/mac/invalid-summary-element.html
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
AX: Invalid summary elements should not be exposed as interactive
https://bugs.webkit.org/show_bug.cgi?id=244973
rdar://problem/99743056
Reviewed by Chris Fleizach.
Prior to this patch, we unconditionally expose summary elements as
AccessibilityRole::Summary. This is not correct in these scenarios:
1. The summary has no details ancestor
2. The summary is not the first summary descendant of the details element
We can get both of these pieces of information from HTMLSummaryElement::isActiveSummary().
With this patch, we only consider something to be AccessibilityRole::Summary if it's the active summary.
* LayoutTests/accessibility/mac/invalid-summary-element-expected.txt: Added.
* LayoutTests/accessibility/mac/invalid-summary-element.html: Added.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
Canonical link: https://commits.webkit.org/260546@main
More information about the webkit-changes
mailing list