AX: Need to update implicit/default values for aria-valuemin, aria-valuenow, and...
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2016 19:31:22 +0000 (19:31 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2016 19:31:22 +0000 (19:31 +0000)
commiteff8dfd3883038bd74581a3d42d17aa9eb262b73
tree23d21de2142ef702ddd6771582c58f9808052c44
parentf2382e07564094ccb1d2151b92ae1c6199fb5448
AX: Need to update implicit/default values for aria-valuemin, aria-valuenow, and aria-valuemax
https://bugs.webkit.org/show_bug.cgi?id=164773

Reviewed by Chris Fleizach.

Source/WebCore:

Return the values stated in the ARIA 1.1 spec, namely:
- aria-valuemin is 0 for roles other than spinbutton
- aria-valuemax is 100 for roles other than spinbutton
- aria-valuenow is half way between aria-valuemax and aria-valuemin
  for roles other than spinbutton, and 0 for spinbutton

For spinbutton, the spec states that "there is no minimum/maximum value."
But at least in the case of ATK/AT-SPI2, the accessible value interface
is expected to provide a number. Therefore, expose the values we use to
constrain input type="number": -std::numeric_limits<float>::max() and
std::numeric_limits<float>::max().

Test: accessibility/spinbutton-implicit-values.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):

LayoutTests:

* accessibility/progressbar-expected.txt: Updated to reflect new behavior.
* accessibility/progressbar.html: Updated to reflect new behavior.
* accessibility/spinbutton-implicit-values-expected.txt: Added.
* accessibility/spinbutton-implicit-values.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/progressbar-expected.txt
LayoutTests/accessibility/progressbar.html
LayoutTests/accessibility/spinbutton-implicit-values-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/spinbutton-implicit-values.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp