[webkit-changes] [WebKit/WebKit] 549911: AX: Make AccessibilityListBoxOption derive from Ac...
AndresGonzalezApple
noreply at github.com
Thu Feb 15 21:19:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 549911e60416cd692e3d2ff355809dc3663e1c88
https://github.com/WebKit/WebKit/commit/549911e60416cd692e3d2ff355809dc3663e1c88
Author: Andres Gonzalez <andresg_22 at apple.com>
Date: 2024-02-15 (Thu, 15 Feb 2024)
Changed paths:
M LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt
M LayoutTests/platform/gtk/inspector/dom/getAccessibilityPropertiesForNode-expected.txt
M Source/WebCore/accessibility/AccessibilityListBoxOption.cpp
M Source/WebCore/accessibility/AccessibilityListBoxOption.h
M Source/WebCore/accessibility/AccessibilityNodeObject.h
Log Message:
-----------
AX: Make AccessibilityListBoxOption derive from AccessibilityNodeObject.
https://bugs.webkit.org/show_bug.cgi?id=269427
<rdar://problem/122987407>
Reviewed by Tyler Wilcock.
This allows to use downcast in the AccessibilityNodeObject implementation when the object is actually a ListBoxOption. This provieds several advantages in the implementation of methods such as AccessibilityNodeObject::stringValue() and text().
This fixes an issue of VoiceOver not speaking some option elements in <select>.
In addition, there is no downside to doing this since previously the ListBoxOption was keeping a reference to an HTMLElement that was either downcast to an HTMLOptionElement or HTmLOptGroupElement. Now we do the same downcasting of a Node object. Some code cleanup included.
* LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* LayoutTests/platform/gtk/inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* Source/WebCore/accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::AccessibilityListBoxOption):
(WebCore::AccessibilityListBoxOption::isEnabled const):
(WebCore::AccessibilityListBoxOption::isSelected const):
(WebCore::AccessibilityListBoxOption::elementRect const):
(WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityListBoxOption::canSetSelectedAttribute const):
(WebCore::AccessibilityListBoxOption::stringValue const):
(WebCore::AccessibilityListBoxOption::actionElement const):
(WebCore::AccessibilityListBoxOption::node const):
(WebCore::AccessibilityListBoxOption::parentObject const):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode const):
(WebCore::AccessibilityListBoxOption::listBoxOptionIndex const):
* Source/WebCore/accessibility/AccessibilityListBoxOption.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
Canonical link: https://commits.webkit.org/274795@main
More information about the webkit-changes
mailing list