Changeset 223766 in webkit
- Timestamp:
- Oct 20, 2017 9:30:20 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r223762 r223766 1 2017-10-20 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: [ATK] Events missing and state incorrect for aria-activedescendant 4 https://bugs.webkit.org/show_bug.cgi?id=178523 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/gtk/aria-activedescendant-changed-notification-expected.txt: Added. 9 * accessibility/gtk/aria-activedescendant-changed-notification.html: Added. 10 * accessibility/gtk/aria-activedescendant-expected.txt: Added. 11 * accessibility/gtk/aria-activedescendant.html: Added. 12 1 13 2017-10-20 Per Arne Vollan <pvollan@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r223757 r223766 1 2017-10-20 Joanmarie Diggs <jdiggs@igalia.com> 2 3 AX: [ATK] Events missing and state incorrect for aria-activedescendant 4 https://bugs.webkit.org/show_bug.cgi?id=178523 5 6 Reviewed by Chris Fleizach. 7 8 When the aria-activedescendant of an element changes, emit object:state-changed:focused. 9 When a focused element has a valid active descendant, do not expose the focused state on 10 the element, but rather on the active descendant. Also expose the focusable state on the 11 active descendant. 12 13 Tests: accessibility/gtk/aria-activedescendant-changed-notification.html 14 accessibility/gtk/aria-activedescendant.html 15 16 * accessibility/AccessibilityObject.cpp: 17 (WebCore::AccessibilityObject::isActiveDescendantOfFocusedContainer const): 18 (WebCore::AccessibilityObject::ariaActiveDescendantReferencingElements const): 19 * accessibility/AccessibilityObject.h: 20 * accessibility/AccessibilityRenderObject.cpp: 21 (WebCore::AccessibilityRenderObject::shouldNotifyActiveDescendant const): 22 * accessibility/atk/AXObjectCacheAtk.cpp: 23 (WebCore::AXObjectCache::postPlatformNotification): 24 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: 25 (setAtkStateSetFromCoreObject): 26 1 27 2017-10-20 Ms2ger <Ms2ger@igalia.com> 2 28 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r223190 r223766 3408 3408 } 3409 3409 3410 bool AccessibilityObject::isActiveDescendantOfFocusedContainer() const 3411 { 3412 AccessibilityChildrenVector containers; 3413 ariaActiveDescendantReferencingElements(containers); 3414 for (auto& container : containers) { 3415 if (container->isFocused()) 3416 return true; 3417 } 3418 3419 return false; 3420 } 3421 3422 void AccessibilityObject::ariaActiveDescendantReferencingElements(AccessibilityChildrenVector& containers) const 3423 { 3424 ariaElementsReferencedByAttribute(containers, aria_activedescendantAttr); 3425 } 3426 3410 3427 void AccessibilityObject::ariaControlsElements(AccessibilityChildrenVector& ariaControls) const 3411 3428 { -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r223190 r223766 671 671 672 672 virtual bool supportsARIAOwns() const { return false; } 673 bool isActiveDescendantOfFocusedContainer() const; 674 void ariaActiveDescendantReferencingElements(AccessibilityChildrenVector&) const; 673 675 void ariaControlsElements(AccessibilityChildrenVector&) const; 674 676 void ariaControlsReferencingElements(AccessibilityChildrenVector&) const; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r223151 r223766 2396 2396 bool AccessibilityRenderObject::shouldNotifyActiveDescendant() const 2397 2397 { 2398 #if PLATFORM(GTK) 2399 // According to the Core AAM spec, ATK expects object:state-changed:focused notifications 2400 // whenever the active descendant changes. 2401 return true; 2402 #endif 2398 2403 // We want to notify that the combo box has changed its active descendant, 2399 2404 // but we do not want to change the focus, because focus should remain with the combo box. -
trunk/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
r222705 r223766 281 281 break; 282 282 283 case AXActiveDescendantChanged: 284 if (AccessibilityObject* descendant = coreObject->activeDescendant()) 285 platformHandleFocusedUIElementChanged(nullptr, descendant->node()); 286 break; 287 283 288 default: 284 289 break; -
trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
r223190 r223766 963 963 atk_state_set_add_state(stateSet, ATK_STATE_FOCUSABLE); 964 964 965 if (coreObject->isFocused() || isTextWithCaret(coreObject)) 965 // According to the Core AAM, if the element which is focused has a valid aria-activedescendant, 966 // we should not expose the focused state on the element which is actually focused, but instead 967 // on its active descendant. 968 if ((coreObject->isFocused() && !coreObject->activeDescendant()) || isTextWithCaret(coreObject)) 966 969 atk_state_set_add_state(stateSet, ATK_STATE_FOCUSED); 970 else if (coreObject->isActiveDescendantOfFocusedContainer()) { 971 atk_state_set_add_state(stateSet, ATK_STATE_FOCUSABLE); 972 atk_state_set_add_state(stateSet, ATK_STATE_FOCUSED); 973 } 967 974 968 975 if (coreObject->orientation() == AccessibilityOrientationHorizontal)
Note: See TracChangeset
for help on using the changeset viewer.