Changeset 148484 in webkit


Ignore:
Timestamp:
Apr 15, 2013 6:34:20 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
https://bugs.webkit.org/show_bug.cgi?id=113975

Patch by James Craig <james@cookiecrook.com> on 2013-04-15
Reviewed by Chris Fleizach.

Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
depending on platform. Updated existing test coverage.

Source/WebCore:

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

  • platform/mac/accessibility/lists-expected.txt:
  • platform/mac/accessibility/role-subrole-roledescription-expected.txt:
  • platform/mac/accessibility/role-subrole-roledescription.html:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148483 r148484  
     12013-04-15  James Craig  <james@cookiecrook.com>
     2
     3        WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
     4        https://bugs.webkit.org/show_bug.cgi?id=113975
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
     9        depending on platform. Updated existing test coverage.
     10
     11        * platform/mac/accessibility/lists-expected.txt:
     12        * platform/mac/accessibility/role-subrole-roledescription-expected.txt:
     13        * platform/mac/accessibility/role-subrole-roledescription.html:
     14
    1152013-04-15  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/LayoutTests/platform/mac/accessibility/lists-expected.txt

    r147520 r148484  
    6969------------
    7070AXRole: AXList
    71 AXSubrole: AXDescriptionList
     71AXSubrole: AXDefinitionList
    7272AXRoleDescription: description list
    7373AXChildren: <array of size 5>
  • trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription-expected.txt

    r147520 r148484  
    8787PASS: dl
    8888      AXRole: AXList
    89       AXSubrole: AXDescriptionList
     89      AXSubrole: AXDefinitionList
    9090      AXRoleDescription: description list
    9191     
  • trunk/LayoutTests/platform/mac/accessibility/role-subrole-roledescription.html

    r147520 r148484  
    2828<!-- skipped <details/summary> http://webkit.org/b/108979 -->
    2929<!-- <dfn> http://webkit.org/b/108980 --><dfn data-role="" data-subrole="" data-roledescription="" class="ex">X</dfn>
    30 <dl data-role="AXList" data-subrole="AXDescriptionList" data-roledescription="description list" class="ex">
     30<dl data-role="AXList" data-subrole="AXDescriptionList" data-alternatesubrole="AXDefinitionList" data-roledescription="description list" class="ex">
    3131    <dt data-role="AXGroup" data-subrole="AXTerm" data-roledescription="term" class="ex">X</dt>
    3232    <dd data-role="AXGroup" data-subrole="AXDescription" data-roledescription="description" class="ex">X</dd>
     
    311311        output += roleDescription + indent;
    312312
    313         expectation = el.getAttribute('data-role') +"/"+ el.getAttribute('data-subrole') +"/"+ el.getAttribute('data-roledescription');
     313        expectation = el.getAttribute('data-role') + "/";
     314        expectation += el.getAttribute('data-subrole');
     315        if (el.getAttribute('data-alternatesubrole')) expectation += " or " + el.getAttribute('data-alternatesubrole');
     316        expectation += "/" + el.getAttribute('data-roledescription');
    314317
    315318        result = document.getElementById('console');
     
    317320        // Test AXRole, AXSubrole, and AXRoleDescription.
    318321        if (role.replace('AXRole: ','') == el.getAttribute('data-role')
    319             && subrole.replace('AXSubrole: ','') == el.getAttribute('data-subrole')
     322            && (subrole.replace('AXSubrole: ','') == el.getAttribute('data-subrole') || subrole.replace('AXSubrole: ','') == el.getAttribute('data-alternatesubrole'))
    320323            && roleDescription.replace('AXRoleDescription: ','') == el.getAttribute('data-roledescription')) {
    321324            result.innerText += "PASS: " + output + "\n";
  • trunk/Source/WebCore/ChangeLog

    r148482 r148484  
     12013-04-15  James Craig  <james@cookiecrook.com>
     2
     3        WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
     4        https://bugs.webkit.org/show_bug.cgi?id=113975
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
     9        depending on platform. Updated existing test coverage.
     10
     11        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     12        (-[WebAccessibilityObjectWrapper subrole]):
     13
    1142013-04-15  Dean Jackson  <dino@apple.com>
    215
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r148044 r148484  
    110110#ifndef NSAccessibilityContentListSubrole
    111111#define NSAccessibilityContentListSubrole @"AXContentList"
     112#endif
     113
     114#ifndef NSAccessibilityDefinitionListSubrole
     115#define NSAccessibilityDefinitionListSubrole @"AXDefinitionList"
    112116#endif
    113117
     
    17521756        if (listObject->isUnorderedList() || listObject->isOrderedList())
    17531757            return NSAccessibilityContentListSubrole;
    1754         if (listObject->isDescriptionList())
     1758        if (listObject->isDescriptionList()) {
     1759#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1090
     1760            return NSAccessibilityDefinitionListSubrole;
     1761#else
    17551762            return NSAccessibilityDescriptionListSubrole;
     1763#endif
     1764        }
    17561765    }
    17571766   
     
    18041813        case DefinitionRole:
    18051814            return @"AXDefinition";
    1806         case DescriptionListRole:
    1807             return @"AXDescriptionList";
    18081815        case DescriptionListTermRole:
    18091816            return @"AXTerm";
Note: See TracChangeset for help on using the changeset viewer.