Changeset 93565 in webkit


Ignore:
Timestamp:
Aug 22, 2011 5:24:30 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Patch by Alice Boxhall <aboxhall@chromium.org> on 2011-08-22
Reviewed by Chris Fleizach.

aria-labelledby should be used in preference to aria-labeledby
https://bugs.webkit.org/show_bug.cgi?id=62351

Source/WebCore:

Test: accessibility/aria-labelledby-overrides-aria-labeledby.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::ariaLabelledByElements): Renamed from ariaLabeledByElements.
(WebCore::AccessibilityRenderObject::ariaLabelledByAttribute): Renamed from ariaLabeledByAttribute,
and re-ordered to prefer the standard spelling.
(WebCore::AccessibilityRenderObject::title):
(WebCore::AccessibilityRenderObject::hasTextAlternative):

  • accessibility/AccessibilityRenderObject.h:

LayoutTests:

  • accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Added.
  • accessibility/aria-labelledby-overrides-aria-labeledby.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93561 r93565  
     12011-08-22  Alice Boxhall  <aboxhall@chromium.org>
     2
     3        Reviewed by Chris Fleizach.
     4
     5        aria-labelledby should be used in preference to aria-labeledby
     6        https://bugs.webkit.org/show_bug.cgi?id=62351
     7
     8        * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Added.
     9        * accessibility/aria-labelledby-overrides-aria-labeledby.html: Added.
     10
    1112011-08-22  Adam Barth  <abarth@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r93564 r93565  
     12011-08-22  Alice Boxhall  <aboxhall@chromium.org>
     2
     3        Reviewed by Chris Fleizach.
     4
     5        aria-labelledby should be used in preference to aria-labeledby
     6        https://bugs.webkit.org/show_bug.cgi?id=62351
     7
     8        Test: accessibility/aria-labelledby-overrides-aria-labeledby.html
     9
     10        * accessibility/AccessibilityRenderObject.cpp:
     11        (WebCore::AccessibilityRenderObject::ariaLabelledByElements): Renamed from ariaLabeledByElements.
     12        (WebCore::AccessibilityRenderObject::ariaLabelledByAttribute): Renamed from ariaLabeledByAttribute,
     13        and re-ordered to prefer the standard spelling.
     14        (WebCore::AccessibilityRenderObject::title):
     15        (WebCore::AccessibilityRenderObject::hasTextAlternative):
     16        * accessibility/AccessibilityRenderObject.h:
     17
    1182011-08-22  Nat Duca  <nduca@chromium.org>
    219
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp

    r93272 r93565  
    12421242}
    12431243   
    1244 void AccessibilityRenderObject::ariaLabeledByElements(Vector<Element*>& elements) const
    1245 {
    1246     elementsFromAttribute(elements, aria_labeledbyAttr);
     1244void AccessibilityRenderObject::ariaLabelledByElements(Vector<Element*>& elements) const
     1245{
     1246    elementsFromAttribute(elements, aria_labelledbyAttr);
    12471247    if (!elements.size())
    1248         elementsFromAttribute(elements, aria_labelledbyAttr);
     1248        elementsFromAttribute(elements, aria_labeledbyAttr);
    12491249}
    12501250   
    1251 String AccessibilityRenderObject::ariaLabeledByAttribute() const
     1251String AccessibilityRenderObject::ariaLabelledByAttribute() const
    12521252{
    12531253    Vector<Element*> elements;
    1254     ariaLabeledByElements(elements);
     1254    ariaLabelledByElements(elements);
    12551255   
    12561256    return accessibilityDescriptionForElements(elements);
     
    13011301        return String();
    13021302   
     1303
    13031304    const AtomicString& title = getAttribute(titleAttr);
    13041305    if (!title.isEmpty())
     
    15911592bool AccessibilityRenderObject::hasTextAlternative() const
    15921593{
    1593     // ARIA: section 2A, bullet #3 says if aria-labeledby or aria-label appears, it should
     1594    // ARIA: section 2A, bullet #3 says if aria-labelledby or aria-label appears, it should
    15941595    // override the "label" element association.
    1595     if (!ariaLabeledByAttribute().isEmpty() || !getAttribute(aria_labelAttr).isEmpty())
     1596    if (!ariaLabelledByAttribute().isEmpty() || !getAttribute(aria_labelAttr).isEmpty())
    15961597        return true;
    15971598       
  • trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h

    r93272 r93565  
    186186    virtual VisibleSelection selection() const;
    187187    virtual String stringValue() const;
    188     virtual String ariaLabeledByAttribute() const;
     188    virtual String ariaLabelledByAttribute() const;
    189189    virtual String title() const;
    190190    virtual String ariaDescribedByAttribute() const;
     
    267267   
    268268    void setRenderObject(RenderObject* renderer) { m_renderer = renderer; }
    269     void ariaLabeledByElements(Vector<Element*>& elements) const;
     269    void ariaLabelledByElements(Vector<Element*>& elements) const;
    270270    bool needsToUpdateChildren() const { return m_childrenDirty; }
    271271   
Note: See TracChangeset for help on using the changeset viewer.