Changeset 170661 in webkit


Ignore:
Timestamp:
Jul 1, 2014 1:29:52 PM (10 years ago)
Author:
Chris Fleizach
Message:

AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
https://bugs.webkit.org/show_bug.cgi?id=134492

Reviewed by Andreas Kling.

Source/WebCore:
Support the indeterminate attribute in AX code.

Test: Update existing test: accessibility/aria-checked-mixed-value

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::checkboxOrRadioValue):

Tools:

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::isIndeterminate):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::isIndeterminate):

LayoutTests:

  • accessibility/aria-checked-mixed-value-expected.txt:
  • accessibility/aria-checked-mixed-value.html:
  • platform/mac/accessibility/aria-checked-mixed-value-expected.txt: Added.
Location:
trunk
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170656 r170661  
     12014-07-01  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
     4        https://bugs.webkit.org/show_bug.cgi?id=134492
     5
     6        Reviewed by Andreas Kling.
     7
     8        * accessibility/aria-checked-mixed-value-expected.txt:
     9        * accessibility/aria-checked-mixed-value.html:
     10        * platform/mac/accessibility/aria-checked-mixed-value-expected.txt: Added.
     11
    1122014-07-01  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/LayoutTests/accessibility/aria-checked-mixed-value-expected.txt

    r161417 r170661  
    2020
    2121
     22Role: AXRole: AXCheckBox
     23Mixed: true
     24
     25
     26Role: AXRole: AXCheckBox
     27Mixed: false
     28
     29
    2230PASS successfullyParsed is true
    2331
  • trunk/LayoutTests/accessibility/aria-checked-mixed-value.html

    r161417 r170661  
    1212<div id="element3" role="checkbox" aria-checked="mixed"></div>
    1313<div id="element4" role="menuitemcheckbox" aria-checked="mixed"></div>
     14<div id="element5" role="checkbox" indeterminate="true"></div>
     15<div id="element6" role="checkbox" indeterminate="false"></div>
    1416
    1517</div>
     
    2325
    2426    if (window.accessibilityController) {
    25           for (var i = 1; i < 5; i++) {
     27          for (var i = 1; i < 7; i++) {
    2628              var element = accessibilityController.accessibleElementById("element" + i);
    2729              debug("Role: " + element.role);
  • trunk/LayoutTests/platform/mac/accessibility/aria-checked-mixed-value-expected.txt

    r170660 r170661  
    88
    99
    10 Role: AXRole: AXRadioMenuItem
     10Role: AXRole: AXMenuItem
    1111Mixed: false
    1212
     
    1616
    1717
    18 Role: AXRole: AXCheckMenuItem
     18Role: AXRole: AXMenuItem
    1919Mixed: true
     20
     21
     22Role: AXRole: AXCheckBox
     23Mixed: true
     24
     25
     26Role: AXRole: AXCheckBox
     27Mixed: false
    2028
    2129
  • trunk/Source/WebCore/ChangeLog

    r170655 r170661  
     12014-07-01  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
     4        https://bugs.webkit.org/show_bug.cgi?id=134492
     5
     6        Reviewed by Andreas Kling.
     7
     8        Support the indeterminate attribute in AX code.
     9
     10        Test: Update existing test: accessibility/aria-checked-mixed-value
     11
     12        * accessibility/AccessibilityObject.cpp:
     13        (WebCore::AccessibilityObject::checkboxOrRadioValue):
     14
    1152014-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r170028 r170661  
    20862086    }
    20872087   
     2088    if (equalIgnoringCase(getAttribute(indeterminateAttr), "true"))
     2089        return ButtonStateMixed;
     2090   
    20882091    return ButtonStateOff;
    20892092}
  • trunk/Tools/ChangeLog

    r170650 r170661  
     12014-07-01  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
     4        https://bugs.webkit.org/show_bug.cgi?id=134492
     5
     6        Reviewed by Andreas Kling.
     7
     8        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
     9        (AccessibilityUIElement::isIndeterminate):
     10        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
     11        (WTR::AccessibilityUIElement::isIndeterminate):
     12
    1132014-07-01  Daniel Bates  <dabates@apple.com>
    214
  • trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

    r168427 r170661  
    14801480bool AccessibilityUIElement::isIndeterminate() const
    14811481{
    1482     // FIXME: implement
    1483     return false;
     1482    BOOL result = NO;
     1483    BEGIN_AX_OBJC_EXCEPTIONS
     1484    id value = [m_element accessibilityAttributeValue:NSAccessibilityValueAttribute];
     1485    if ([value isKindOfClass:[NSNumber class]])
     1486        result = [value intValue] == 2;
     1487    END_AX_OBJC_EXCEPTIONS
     1488    return result;
    14841489}
    14851490
  • trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

    r169483 r170661  
    951951bool AccessibilityUIElement::isIndeterminate() const
    952952{
    953     // FIXME: implement
    954     return false;
     953    BOOL result = NO;
     954    BEGIN_AX_OBJC_EXCEPTIONS
     955    id value = [m_element accessibilityAttributeValue:NSAccessibilityValueAttribute];
     956    if ([value isKindOfClass:[NSNumber class]])
     957        result = [value intValue] == 2;
     958    END_AX_OBJC_EXCEPTIONS
     959    return result;
    955960}
    956961
Note: See TracChangeset for help on using the changeset viewer.