AX: buttons of number type <input> controls are not fully accessible
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2011 23:37:59 +0000 (23:37 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2011 23:37:59 +0000 (23:37 +0000)
commita7a3c7ce20f61d0d5bf8292aa05fa55e689633cd
treeaf553357980c595b681cc39c695dcc96b86d15cc
parent6ac2f832c2b1633d0c24050eef9d0df8b90a8a62
AX: buttons of number type <input> controls are not fully accessible
https://bugs.webkit.org/show_bug.cgi?id=70241

Source/WebCore:

Expose the spin button object to the AX hierarchy. Since there is no distinct
render object that backs this object, a mock object needs to be created for the entire
spin button and the actual increment and decrement buttons inside.

Reviewed by Darin Adler.

Test: platform/mac/accessibility/html5-input-number.html

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
* accessibility/AccessibilityMockObject.cpp:
(WebCore::AccessibilityMockObject::AccessibilityMockObject):
* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::isMockObject):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::boundingBoxForQuads):
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isSpinButton):
(WebCore::AccessibilityObject::isSpinButtonPart):
(WebCore::AccessibilityObject::isMockObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::boundingBoxRect):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySpinButton.cpp: Added.
(WebCore::AccessibilitySpinButton::create):
(WebCore::AccessibilitySpinButton::AccessibilitySpinButton):
(WebCore::AccessibilitySpinButton::~AccessibilitySpinButton):
(WebCore::AccessibilitySpinButton::incrementButton):
(WebCore::AccessibilitySpinButton::decrementButton):
(WebCore::AccessibilitySpinButton::elementRect):
(WebCore::AccessibilitySpinButton::addChildren):
(WebCore::AccessibilitySpinButton::step):
(WebCore::AccessibilitySpinButtonPart::AccessibilitySpinButtonPart):
(WebCore::AccessibilitySpinButtonPart::create):
(WebCore::AccessibilitySpinButtonPart::elementRect):
(WebCore::AccessibilitySpinButtonPart::press):
* accessibility/AccessibilitySpinButton.h: Added.
(WebCore::AccessibilitySpinButton::setSpinButtonElement):
(WebCore::AccessibilitySpinButton::roleValue):
(WebCore::AccessibilitySpinButton::accessibilityIsIgnored):
(WebCore::AccessibilitySpinButton::isSpinButton):
(WebCore::AccessibilitySpinButtonPart::~AccessibilitySpinButtonPart):
(WebCore::AccessibilitySpinButtonPart::isIncrementor):
(WebCore::AccessibilitySpinButtonPart::setIsIncrementor):
(WebCore::AccessibilitySpinButtonPart::roleValue):
(WebCore::AccessibilitySpinButtonPart::isSpinButtonPart):
(WebCore::AccessibilitySpinButtonPart::accessibilityIsIgnored):
(WebCore::toAccessibilitySpinButton):
(WebCore::toAccessibilitySpinButtonPart):
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityActionNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SpinButtonElement::step):
(WebCore::SpinButtonElement::repeatingTimerFired):
* html/shadow/TextControlInnerElements.h:

LayoutTests:

Reviewed by Darin Adler.

* platform/mac/accessibility/html5-input-number-expected.txt: Added.
* platform/mac/accessibility/html5-input-number.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@97669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/html5-input-number-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/html5-input-number.html [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityMockObject.h
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/AccessibilitySpinButton.cpp [new file with mode: 0644]
Source/WebCore/accessibility/AccessibilitySpinButton.h [new file with mode: 0644]
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/html/shadow/TextControlInnerElements.h