Changeset 186038 in webkit


Ignore:
Timestamp:
Jun 27, 2015, 4:02:03 PM (10 years ago)
Author:
Chris Fleizach
Message:

AX: implement @aria-roledescription
https://bugs.webkit.org/show_bug.cgi?id=146274

Reviewed by Darin Adler.

Source/WebCore:

Add support for aria-roledescription.

Test: accessibility/aria-roledescription.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::hasHighlighting):
(WebCore::AccessibilityObject::roleDescription):
(WebCore::nodeHasPresentationRole):

  • accessibility/AccessibilityObject.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
(-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
(-[WebAccessibilityObjectWrapper accessibilityLabel]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper roleDescription]):

LayoutTests:

  • accessibility/aria-roledescription-expected.txt: Added.
  • accessibility/aria-roledescription.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r186034 r186038  
     12015-06-27  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: implement @aria-roledescription
     4        https://bugs.webkit.org/show_bug.cgi?id=146274
     5
     6        Reviewed by Darin Adler.
     7
     8        * accessibility/aria-roledescription-expected.txt: Added.
     9        * accessibility/aria-roledescription.html: Added.
     10
    1112015-06-27  Myles C. Maxfield  <mmaxfield@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r186036 r186038  
     12015-06-27  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: implement @aria-roledescription
     4        https://bugs.webkit.org/show_bug.cgi?id=146274
     5
     6        Reviewed by Darin Adler.
     7
     8        Add support for aria-roledescription.
     9
     10        Test: accessibility/aria-roledescription.html
     11
     12        * accessibility/AccessibilityObject.cpp:
     13        (WebCore::AccessibilityObject::hasHighlighting):
     14        (WebCore::AccessibilityObject::roleDescription):
     15        (WebCore::nodeHasPresentationRole):
     16        * accessibility/AccessibilityObject.h:
     17        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
     18        (-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
     19        (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
     20        (-[WebAccessibilityObjectWrapper accessibilityLabel]):
     21        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
     22        (-[WebAccessibilityObjectWrapper roleDescription]):
     23
    1242015-06-27  Darin Adler  <darin@apple.com>
    225
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r185924 r186038  
    20282028}
    20292029
     2030const AtomicString& AccessibilityObject::roleDescription() const
     2031{
     2032    return getAttribute(aria_roledescriptionAttr);
     2033}
     2034   
    20302035static bool nodeHasPresentationRole(Node* node)
    20312036{
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r185924 r186038  
    622622    String identifierAttribute() const;
    623623    void classList(Vector<String>&) const;
     624    const AtomicString& roleDescription() const;
    624625   
    625626    bool supportsARIASetSize() const;
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r185884 r186038  
    854854}
    855855
     856- (NSString *)accessibilityRoleDescription
     857{
     858    return m_object->roleDescription();
     859}
     860
    856861- (NSString *)accessibilityLabel
    857862{
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r185593 r186038  
    22072207#pragma clang diagnostic pop
    22082208
     2209    const AtomicString& overrideRoleDescription = m_object->roleDescription();
     2210    if (!overrideRoleDescription.isNull())
     2211        return overrideRoleDescription;
     2212   
    22092213    NSString* axRole = [self role];
    22102214   
  • trunk/Source/WebCore/html/HTMLAttributeNames.in

    r183881 r186038  
    4343aria-relevant
    4444aria-required
     45aria-roledescription
    4546aria-selected
    4647aria-setsize
Note: See TracChangeset for help on using the changeset viewer.