Changeset 206391 in webkit


Ignore:
Timestamp:
Sep 26, 2016 2:02:42 PM (8 years ago)
Author:
n_wang@apple.com
Message:

AX: Progress: [Mac] Content in label element should be used as AXTitle or AXDescription
https://bugs.webkit.org/show_bug.cgi?id=162573

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed the label element's text as the AXTitle of the progress indicator.

Test: accessibility/mac/progress-with-label-element.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::titleElementText):
(WebCore::AccessibilityNodeObject::title):

LayoutTests:

  • accessibility/mac/progress-with-label-element-expected.txt: Added.
  • accessibility/mac/progress-with-label-element.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206389 r206391  
     12016-09-26  Nan Wang  <n_wang@apple.com>
     2
     3        AX: Progress: [Mac] Content in label element should be used as AXTitle or AXDescription
     4        https://bugs.webkit.org/show_bug.cgi?id=162573
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/mac/progress-with-label-element-expected.txt: Added.
     9        * accessibility/mac/progress-with-label-element.html: Added.
     10
    1112016-09-26  Ryan Haddad  <ryanhaddad@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r206390 r206391  
     12016-09-26  Nan Wang  <n_wang@apple.com>
     2
     3        AX: Progress: [Mac] Content in label element should be used as AXTitle or AXDescription
     4        https://bugs.webkit.org/show_bug.cgi?id=162573
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Exposed the label element's text as the AXTitle of the progress indicator.
     9
     10        Test: accessibility/mac/progress-with-label-element.html
     11
     12        * accessibility/AccessibilityNodeObject.cpp:
     13        (WebCore::AccessibilityNodeObject::titleElementText):
     14        (WebCore::AccessibilityNodeObject::title):
     15
    1162016-09-26  Ryan Haddad  <ryanhaddad@apple.com>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r206259 r206391  
    12391239   
    12401240    bool isInputTag = is<HTMLInputElement>(*node);
    1241     if (isInputTag || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl()) {
     1241    if (isInputTag || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl() || isProgressIndicator()) {
    12421242        if (HTMLLabelElement* label = labelForElement(downcast<Element>(node))) {
    12431243            AccessibilityObject* labelObject = axObjectCache()->getOrCreate(label);
     
    17111711    }
    17121712
    1713     if (isInputTag || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl()) {
     1713    if (isInputTag || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl() || isProgressIndicator()) {
    17141714        HTMLLabelElement* label = labelForElement(downcast<Element>(node));
    17151715        // Use the label text as the title if 1) the title element is NOT an exposed element and 2) there's no ARIA override.
Note: See TracChangeset for help on using the changeset viewer.