Changeset 89204 in webkit


Ignore:
Timestamp:
Jun 18, 2011 1:27:31 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-18 Alice Boxhall <aboxhall@chromium.org>

Reviewed by Chris Fleizach.

Accessibility description for an element should make use of aria-labelledby.
https://bugs.webkit.org/show_bug.cgi?id=61995

  • accessibility/aria-labelledby-on-input.html:
  • accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added.
  • accessibility/aria-labelledby-overrides-aria-label.html: Added.
  • accessibility/aria-labelledby-overrides-label-expected.txt:
  • accessibility/aria-labelledby-overrides-label.html:
  • accessibility/aria-labelledby-stay-within.html:
  • platform/mac/accessibility/aria-labelledby-on-input-expected.txt:

2011-06-18 Alice Boxhall <aboxhall@chromium.org>

Reviewed by Chris Fleizach.

Accessibility description for an element should make use of aria-labelledby.
https://bugs.webkit.org/show_bug.cgi?id=61995

Tests: accessibility/aria-labelledby-overrides-aria-label.html

  • accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::title): Don't return value from aria-labelledby. (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): Return value from aria-labelledby in preference to value from aria-label.
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r89203 r89204  
     12011-06-18  Alice Boxhall  <aboxhall@chromium.org>
     2
     3        Reviewed by Chris Fleizach.
     4
     5        Accessibility description for an element should make use of aria-labelledby.
     6        https://bugs.webkit.org/show_bug.cgi?id=61995
     7
     8        * accessibility/aria-labelledby-on-input.html:
     9        * accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added.
     10        * accessibility/aria-labelledby-overrides-aria-label.html: Added.
     11        * accessibility/aria-labelledby-overrides-label-expected.txt:
     12        * accessibility/aria-labelledby-overrides-label.html:
     13        * accessibility/aria-labelledby-stay-within.html:
     14        * platform/mac/accessibility/aria-labelledby-on-input-expected.txt:
     15
    1162011-06-18  Adam Bergkvist  <adam.bergkvist@ericsson.com>
    217
  • trunk/LayoutTests/accessibility/aria-labelledby-on-input.html

    r35193 r89204  
    1515            labeledItem.focus();
    1616            var result = document.getElementById("result");
    17             result.innerText = "\nThe accessibility title is \"" + accessibilityController.focusedElement.title + "\"";
     17            result.innerText = "\nThe accessibility description is \"" + accessibilityController.focusedElement.description + "\"";
    1818        }
    1919    </script>
  • trunk/LayoutTests/accessibility/aria-labelledby-overrides-label-expected.txt

    r51055 r89204  
    55
    66
    7 PASS text.title is 'AXTitle: Shut down computer after 10 minutes'
     7PASS text.description is 'AXDescription: Shut down computer after 10 minutes'
    88PASS text.titleUIElement().isValid is false
    99PASS labelElement.role is 'AXRole: AXStaticText'
  • trunk/LayoutTests/accessibility/aria-labelledby-overrides-label.html

    r51055 r89204  
    2727          text = accessibilityController.focusedElement;
    2828
    29           shouldBe("text.title", "'AXTitle: Shut down computer after 10 minutes'");
     29          shouldBe("text.description", "'AXDescription: Shut down computer after 10 minutes'");
    3030
    3131          // There should be no title UI element.
  • trunk/LayoutTests/accessibility/aria-labelledby-stay-within.html

    r46770 r89204  
    3333            labeledItem.focus();
    3434            var result = document.getElementById("result");
    35             if ( accessibilityController.focusedElement.title == "AXTitle: Reply Item Five" ) {
     35            if ( accessibilityController.focusedElement.description == "AXDescription: Reply Item Five" ) {
    3636               result.innerText = "Passed";
    3737            }
    3838            else {
    39                result.innerText = "Failed. Result ==" + accessibilityController.focusedElement.title + "==";
     39               result.innerText = "Failed. Result ==" + accessibilityController.focusedElement.description + "==";
    4040            }
    4141        }
  • trunk/LayoutTests/platform/mac/accessibility/aria-labelledby-on-input-expected.txt

    r46770 r89204  
    11This computer will self-destruct in   minutes.
    22
    3 The accessibility title is "AXTitle: This computer will self-destruct in 10 minutes."
     3The accessibility description is "AXDescription: This computer will self-destruct in 10 minutes."
  • trunk/Source/WebCore/ChangeLog

    r89200 r89204  
     12011-06-18  Alice Boxhall  <aboxhall@chromium.org>
     2
     3        Reviewed by Chris Fleizach.
     4
     5        Accessibility description for an element should make use of aria-labelledby.
     6        https://bugs.webkit.org/show_bug.cgi?id=61995
     7
     8        Tests: accessibility/aria-labelledby-overrides-aria-label.html
     9
     10        * accessibility/AccessibilityRenderObject.cpp:
     11        (WebCore::AccessibilityRenderObject::title): Don't return value from aria-labelledby.
     12        (WebCore::AccessibilityRenderObject::ariaAccessibilityDescription): Return value from aria-labelledby in preference to value from aria-label.
     13
    1142011-06-18  Christoph Mende  <mende.christoph@gmail.com>
    215
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r88456 r89204  
    13061306        return String();
    13071307   
    1308     String ariaLabel = ariaLabeledByAttribute();
    1309     if (!ariaLabel.isEmpty())
    1310         return ariaLabel;
    1311    
    13121308    const AtomicString& title = getAttribute(titleAttr);
    13131309    if (!title.isEmpty())
     
    13521348String AccessibilityRenderObject::ariaAccessibilityDescription() const
    13531349{
     1350    const AtomicString& ariaLabeledBy = ariaLabeledByAttribute();
     1351    if (!ariaLabeledBy.isEmpty())
     1352        return ariaLabeledBy;
     1353
    13541354    const AtomicString& ariaLabel = getAttribute(aria_labelAttr);
    13551355    if (!ariaLabel.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.