AX: Self-referencing aria-labelledby only uses contents.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 09:51:25 +0000 (09:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 09:51:25 +0000 (09:51 +0000)
commitff362d886a799660778b9a412066b3795735aadc
treeda44b1747cb2e9030e18b731fe4a910c92f2d9f2
parentebdecdf93141c82b17d6996c11ab56753a205027
AX: Self-referencing aria-labelledby only uses contents.
https://bugs.webkit.org/show_bug.cgi?id=120814

Patch by Samuel White <samuel_white@apple.com> on 2013-09-12
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Implemented additional 'Text Alternative Computation' steps documented at:
http://www.w3.org/WAI/PF/aria/complete#textalternativecomputation. This allows us to remove
our raw text node iteration that was previously forcing us to do our computation incorrectly.
Element content is now sourced using textUnderElement (step 2C of the computation).

Test: accessibility/self-referencing-aria-labelledby.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):

LayoutTests:

Test to verify that self-referencing aria-labelledby behavior works as expected.

* accessibility/self-referencing-aria-labelledby-expected.txt: Added.
* accessibility/self-referencing-aria-labelledby.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155601 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/self-referencing-aria-labelledby-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/self-referencing-aria-labelledby.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp