Changeset 207583 in webkit


Ignore:
Timestamp:
Oct 19, 2016 7:33:19 PM (8 years ago)
Author:
n_wang@apple.com
Message:

AX: [Mac] Mark element AXAPI should comform to specs
https://bugs.webkit.org/show_bug.cgi?id=163707

Reviewed by Chris Fleizach.

Source/WebCore:

Created a new role for mark elements on Mac and exposed the role
description.

Changes are covered in modified test expectaions.

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper roleDescription]):

  • platform/LocalizedStrings.cpp:

(WebCore::AXMarkText):

  • platform/LocalizedStrings.h:

LayoutTests:

Added the modified roles-computedRoleString-expected.txt in mac platform so
that the exposed mark element won't affect other platform.

  • platform/mac/accessibility/roles-computedRoleString-expected.txt: Added.
  • platform/mac/accessibility/roles-exposed-expected.txt:
Location:
trunk
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207581 r207583  
     12016-10-19  Nan Wang  <n_wang@apple.com>
     2
     3        AX: [Mac] Mark element AXAPI should comform to specs
     4        https://bugs.webkit.org/show_bug.cgi?id=163707
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Added the modified roles-computedRoleString-expected.txt in mac platform so
     9        that the exposed mark element won't affect other platform.
     10
     11        * platform/mac/accessibility/roles-computedRoleString-expected.txt: Added.
     12        * platform/mac/accessibility/roles-exposed-expected.txt:
     13
    1142016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
    215
  • trunk/LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt

    r207401 r207583  
    356356     
    357357mark
    358       AXRole:
    359       AXSubrole:
    360       AXRoleDescription:
     358      AXRole: AXGroup
     359      AXSubrole:
     360      AXRoleDescription: highlighted
    361361     
    362362math
  • trunk/Source/WebCore/ChangeLog

    r207582 r207583  
     12016-10-19  Nan Wang  <n_wang@apple.com>
     2
     3        AX: [Mac] Mark element AXAPI should comform to specs
     4        https://bugs.webkit.org/show_bug.cgi?id=163707
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Created a new role for mark elements on Mac and exposed the role
     9        description.
     10
     11        Changes are covered in modified test expectaions.
     12
     13        * English.lproj/Localizable.strings:
     14        * accessibility/AccessibilityObject.h:
     15        * accessibility/AccessibilityRenderObject.cpp:
     16        (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
     17        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
     18        (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
     19        * accessibility/mac/AccessibilityObjectMac.mm:
     20        (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
     21        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     22        (createAccessibilityRoleMap):
     23        (-[WebAccessibilityObjectWrapper roleDescription]):
     24        * platform/LocalizedStrings.cpp:
     25        (WebCore::AXMarkText):
     26        * platform/LocalizedStrings.h:
     27
    1282016-10-19  Alex Christensen  <achristensen@webkit.org>
    229
  • trunk/Source/WebCore/English.lproj/Localizable.strings

    r207540 r207583  
    914914"hide closed captions" = "hide closed captions";
    915915
     916/* accessibility role description for a mark element */
     917"highlighted" = "highlighted";
     918
    916919/* accessibility role description for image map */
    917920"image map" = "image map";
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r207429 r207583  
    161161    ListItemRole,
    162162    ListMarkerRole,
     163    MarkRole,
    163164    MathElementRole,
    164165    MatteRole,
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r207429 r207583  
    27422742    if (node && node->hasTagName(captionTag))
    27432743        return CaptionRole;
     2744   
     2745    if (node && node->hasTagName(markTag))
     2746        return MarkRole;
    27442747
    27452748    if (node && node->hasTagName(preTag))
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r207314 r207583  
    858858        case ListBoxRole:
    859859        case ListItemRole:
     860        case MarkRole:
    860861        case MathElementRole:
    861862        case MatteRole:
  • trunk/Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm

    r199110 r207583  
    8787    if (roleValue() == CaptionRole)
    8888        return IgnoreObject;
     89   
     90    if (roleValue() == MarkRole)
     91        return IncludeObject;
    8992
    9093    // Never expose an unknown object on the Mac. Clients of the AX API will not know what to do with it.
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r207540 r207583  
    22142214        { SVGTSpanRole, NSAccessibilityGroupRole },
    22152215        { InlineRole, NSAccessibilityGroupRole },
     2216        { MarkRole, NSAccessibilityGroupRole },
    22162217    };
    22172218    AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
     
    24992500        case FooterRole:
    25002501            return AXFooterRoleDescriptionText();
     2502        case MarkRole:
     2503            return AXMarkText();
    25012504        case VideoRole:
    25022505            return localizedMediaControlElementString("VideoElement");
  • trunk/Source/WebCore/platform/LocalizedStrings.cpp

    r207540 r207583  
    782782}
    783783   
     784String AXMarkText()
     785{
     786    return WEB_UI_STRING("highlighted", "accessibility role description for a mark element");
     787}
     788
    784789#if ENABLE(METER_ELEMENT)
    785790String AXMeterGaugeRegionOptimumText()
  • trunk/Source/WebCore/platform/LocalizedStrings.h

    r207540 r207583  
    197197    String AXARIAContentGroupText(const String& ariaType);
    198198    String AXHorizontalRuleDescriptionText();
     199    String AXMarkText();
    199200#if ENABLE(METER_ELEMENT)
    200201    String AXMeterGaugeRegionOptimumText();
Note: See TracChangeset for help on using the changeset viewer.