Skip to content
Permalink
Browse files
[GTK][a11y] WTR: handle heading level as special case in intValue wit…
…h ATSPI

https://bugs.webkit.org/show_bug.cgi?id=234603

Reviewed by Adrian Perez de Castro.

Tests expect intValue to return the heading level.

* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::intValue const):


Canonical link: https://commits.webkit.org/245532@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Dec 23, 2021
1 parent 4da3ccc commit 50afb4f3a8c8bb2b7de19ee09e1ca831542daa3b
Showing 2 changed files with 28 additions and 6 deletions.
@@ -1,3 +1,15 @@
2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK][a11y] WTR: handle heading level as special case in intValue with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234603

Reviewed by Adrian Perez de Castro.

Tests expect intValue to return the heading level.

* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::intValue const):

2021-12-23 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK][a11y] WTR: handle missing cases in isAttributeSettable with ATSPI
@@ -867,15 +867,25 @@ double AccessibilityUIElement::clickPointY()

double AccessibilityUIElement::intValue() const
{
if (!m_element->interfaces().contains(WebCore::AccessibilityObjectAtspi::Interface::Value))
return 0;
if (m_element->interfaces().contains(WebCore::AccessibilityObjectAtspi::Interface::Value)) {
double currentValue;
s_controller->executeOnAXThreadAndWait([this, &currentValue] {
m_element->updateBackingStore();
currentValue = m_element->currentValue();
});
return currentValue;
}

double currentValue;
s_controller->executeOnAXThreadAndWait([this, &currentValue] {
// Consider headings as an special case when returning the int value.
unsigned elementRole;
s_controller->executeOnAXThreadAndWait([this, &elementRole] {
m_element->updateBackingStore();
currentValue = m_element->currentValue();
elementRole = m_element->role();
});
return currentValue;
if (elementRole == WebCore::Atspi::Role::Heading)
return m_element->attributes().get("level").toDouble();

return 0;
}

double AccessibilityUIElement::minValue()

0 comments on commit 50afb4f

Please sign in to comment.