2008-05-06 Beth Dakin <bdakin@apple.com>
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 01:47:47 +0000 (01:47 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 May 2008 01:47:47 +0000 (01:47 +0000)
commita0352de2a3a1164f3d1d37dc93ad23adae46b31e
tree84ccdc3e37ac901daf98434441eebe7591eacec0
parent035ba974da00f908a309bafd73b63fab54baeb6a
2008-05-06  Beth Dakin  <bdakin@apple.com>

        Reviewed by Darin.

        Fix for <rdar://problem/5907916> Implement 'aria-labeledby' and
        'aria-describedby' attributes.

        * html/HTMLAttributeNames.in: Added new attributes. Added both the
        British spelling (since that is what is specified in the spec), and
        the American spelling (since the bug filer and I are two Americans
        who keep spelling it the American way by accident).
        * page/AccessibilityObject.cpp: Added empty wrappers. These
        functions can't do anything meaningful without a renderer.
        (WebCore::AccessibilityObject::ariaAccessiblityName):
        (WebCore::AccessibilityObject::ariaLabeledByAttribute):
        (WebCore::AccessibilityObject::ariaDescribedByAttribute):
        * page/AccessibilityObject.h:

        Here is where the real work is done.
        * page/AccessibilityRenderObject.h:
        * page/AccessibilityRenderObject.cpp:
        (WebCore::accessibleNameForNode): Takes a node and finds its
        contribution to the accessible name, as defined by the Mozilla ARIA
        Implementer's Guide.
        (WebCore::AccessibilityRenderObject::ariaAccessiblityName): Takes a
        string of space-separated IDs, fetches the corresponding element
        for each ID, and concatenates an accessible name based on the
        elements.
        (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute):
        Retrieve the labeledby attribute and send its contents to
        ariaAccessibilityName().
        (WebCore::AccessibilityRenderObject::title): Return the ARIA
        labeledby value if one exists.
        (WebCore::AccessibilityRenderObject::ariaDescribedByAttribute):
        Retrieve the describedby attribute and send its contents to
        ariaAccessibilityName().
        (WebCore::AccessibilityRenderObject::accessibilityDescription):
        Return the ARIA describedby attribute if one exists.

        These are two bugs I spotted.
        (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Don't
        ignore anything with an ARIA role.
        (WebCore::AccessibilityRenderObject::roleValue): Button tags maps
        to ButtonRole.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/html/HTMLAttributeNames.in
WebCore/page/AccessibilityObject.cpp
WebCore/page/AccessibilityObject.h
WebCore/page/AccessibilityRenderObject.cpp
WebCore/page/AccessibilityRenderObject.h