Title: [287391] trunk/Tools
- Revision
- 287391
- Author
- carlo...@webkit.org
- Date
- 2021-12-23 00:57:03 -0800 (Thu, 23 Dec 2021)
Log Message
[GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234601
Reviewed by Adrian Perez de Castro.
We need to handle aria-readonly attribute and the combobox and listbox elements.
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::isAttributeSettable):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (287390 => 287391)
--- trunk/Tools/ChangeLog 2021-12-23 08:56:11 UTC (rev 287390)
+++ trunk/Tools/ChangeLog 2021-12-23 08:57:03 UTC (rev 287391)
@@ -1,5 +1,17 @@
2021-12-23 Carlos Garcia Campos <cgar...@igalia.com>
+ [GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI
+ https://bugs.webkit.org/show_bug.cgi?id=234601
+
+ Reviewed by Adrian Perez de Castro.
+
+ We need to handle aria-readonly attribute and the combobox and listbox elements.
+
+ * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
+ (WTR::AccessibilityUIElement::isAttributeSettable):
+
+2021-12-23 Carlos Garcia Campos <cgar...@igalia.com>
+
[GTK][a11y] WTR: add missing bool and string attribute values with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234599
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp (287390 => 287391)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp 2021-12-23 08:56:11 UTC (rev 287390)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp 2021-12-23 08:57:03 UTC (rev 287391)
@@ -488,6 +488,34 @@
if (checkElementState(m_element.get(), WebCore::Atspi::State::Checkable))
return true;
+ auto attributes = m_element->attributes();
+ String isReadOnly = attributes.get("readonly");
+ if (!isReadOnly.isEmpty())
+ return isReadOnly == "true" ? false : true;
+
+ // If we have a listbox or combobox and the value can be set, the options should be selectable.
+ unsigned elementRole;
+ s_controller->executeOnAXThreadAndWait([this, &elementRole] {
+ m_element->updateBackingStore();
+ elementRole = m_element->role();
+ });
+ switch (elementRole) {
+ case WebCore::Atspi::Role::ComboBox:
+ case WebCore::Atspi::Role::ListBox:
+ if (auto child = childAtIndex(0)) {
+ if (elementRole == WebCore::Atspi::Role::ComboBox) {
+ // First child is the menu.
+ child = child->childAtIndex(0);
+ }
+
+ if (child)
+ return checkElementState(child->m_element.get(), WebCore::Atspi::State::Selectable);
+ }
+ break;
+ default:
+ break;
+ }
+
if (m_element->interfaces().contains(WebCore::AccessibilityObjectAtspi::Interface::Value)
&& checkElementState(m_element.get(), WebCore::Atspi::State::Focusable)) {
double minimumValue, maximumValue;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes