Source/WebCore: AccessibilityObject levels are inconsistent
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Aug 2011 18:28:02 +0000 (18:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Aug 2011 18:28:02 +0000 (18:28 +0000)
commit040dd14b5b95223742f725dbe62061da511b329f
tree35dfa529a0b160d8380920472c92f4049e08a02e
parent7ce980e0aafcf93e42a708186a6aca1e19d148b6
Source/WebCore: AccessibilityObject levels are inconsistent
https://bugs.webkit.org/show_bug.cgi?id=66180

Updated accessibilityTable to return level values consistent with other accessibilityObjects that
return level values. This means a value of 0 is now only returned when tableLevel() is called on a
non-table element.

Patch by Sam White <samuel.white@rochester.edu> on 2011-08-17
Reviewed by Chris Fleizach.

Test: platform/mac/accessibility/element-level.html

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableLevel):
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools: AccessibilityObject levels are inconsistent
https://bugs.webkit.org/show_bug.cgi?id=66180

Added the ability to get numeric attribute values using numberAttributeValue. This
function complements the existing stringAttributeValue and boolAttributeValue functions.
The addition of numberAttributeValue was necessary because the stringAttributeValue
function does a type check and will only return strings. This limitation made it
impossible to get values for attributes that returned an NSNumber.

Patch by Sam White <samuel.white@rochester.edu> on 2011-08-17
Reviewed by Chris Fleizach.

* DumpRenderTree/AccessibilityUIElement.cpp:
(numberAttributeValueCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::numberAttributeValue):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::numberAttributeValue):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::numberAttributeValue):

LayoutTests: AccessibilityObject levels are inconsistent
https://bugs.webkit.org/show_bug.cgi?id=66180

This test ensures that all AccessibilityObjects that return a level value return consistent results.
For example, a level of 0 should only be returned by a level function when it is called on an
AccessibilityObject of the wrong type. It's especially important that we enforce this consistency
using layout tests because these level values are not defined by the W3C but are still used by
popular screen readers such as VoiceOver.

Patch by Sam White <samuel.white@rochester.edu> on 2011-08-17
Reviewed by Chris Fleizach.

* platform/mac/accessibility/element-level-expected.txt: Added.
* platform/mac/accessibility/element-level.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/element-level-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/element-level.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp