AX: aria-pressed state not correctly conveyed to VoiceOver iOS on <button> unless...
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2016 15:14:27 +0000 (15:14 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2016 15:14:27 +0000 (15:14 +0000)
commit3b040ef1ca3ea3b62511331431b50377dc4819a8
tree354195e6b1d5bb3523225f7ff59875cfe18b3d4e
parent069e32fd55c9a0ea9af6daabf24414200891f666
AX: aria-pressed state not correctly conveyed to VoiceOver iOS on <button> unless role=button added
https://bugs.webkit.org/show_bug.cgi?id=162269

Reviewed by Chris Fleizach.

Source/WebCore:

<button> with aria-pressed attribute has a toggle button role, however, we were looking for explicit
roles in order to convey the aria-press state. Since there's no spec requiring authors explicitly defining
default ARIA semantics in such case, I'm exposing the aria-pressed state for all valid toggle buttons.

Changes are covered in modified test.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isPressed):

LayoutTests:

Added test cases and also fixed a wrong expected output.

* accessibility/ios-simulator/aria-pressed-state-expected.txt:
* accessibility/ios-simulator/aria-pressed-state.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/ios-simulator/aria-pressed-state-expected.txt
LayoutTests/accessibility/ios-simulator/aria-pressed-state.html
LayoutTests/accessibility/ios-simulator/toggle-button-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp