Title: [287566] trunk/Source/WebCore
Revision
287566
Author
carlo...@webkit.org
Date
2022-01-04 07:27:18 -0800 (Tue, 04 Jan 2022)

Log Message

[GTK][a11y] Take into account the active descendant when setting focus related states with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=234751

Reviewed by Joanmarie Diggs.

* accessibility/atspi/AccessibilityObjectAtspi.cpp:
(WebCore::AccessibilityObjectAtspi::state const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287565 => 287566)


--- trunk/Source/WebCore/ChangeLog	2022-01-04 15:10:48 UTC (rev 287565)
+++ trunk/Source/WebCore/ChangeLog	2022-01-04 15:27:18 UTC (rev 287566)
@@ -1,5 +1,15 @@
 2022-01-04  Carlos Garcia Campos  <cgar...@igalia.com>
 
+        [GTK][a11y] Take into account the active descendant when setting focus related states with ATSPI
+        https://bugs.webkit.org/show_bug.cgi?id=234751
+
+        Reviewed by Joanmarie Diggs.
+
+        * accessibility/atspi/AccessibilityObjectAtspi.cpp:
+        (WebCore::AccessibilityObjectAtspi::state const):
+
+2022-01-04  Carlos Garcia Campos  <cgar...@igalia.com>
+
         [GTK][a11y] Ensure ATSPI wrappers are destroyed in the main thread
         https://bugs.webkit.org/show_bug.cgi?id=234808
 

Modified: trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp (287565 => 287566)


--- trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp	2022-01-04 15:10:48 UTC (rev 287565)
+++ trunk/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp	2022-01-04 15:27:18 UTC (rev 287566)
@@ -792,8 +792,12 @@
         if (m_coreObject->canSetFocusAttribute())
             addState(Atspi::State::Focusable);
 
-        if (m_coreObject->isFocused())
+        if (m_coreObject->isFocused() && !m_coreObject->activeDescendant())
             addState(Atspi::State::Focused);
+        else if (m_coreObject->isActiveDescendantOfFocusedContainer()) {
+            addState(Atspi::State::Focusable);
+            addState(Atspi::State::Focused);
+        }
 
         if (m_coreObject->canSetValueAttribute()) {
             if (m_coreObject->supportsChecked())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to