haikuwebkit/LayoutTests/accessibility/button-title-uses-inner-img...

13 lines
394 B
Plaintext
Raw Permalink Normal View History

Button with image of
AX: textUnderElement should consider alt text, but skip links and controls https://bugs.webkit.org/show_bug.cgi?id=101650 Reviewed by Chris Fleizach. Source/WebCore: Getting inner text from an element now ignores focusable descendants and containers, but uses alternative text. The computation of textUnderElement is now recursive and doesn't depend on text iterators, which might not do the right thing for accessibility anyways. For GTK, the old behavior is retained so that support for the object replacement character is still there. Filed a new bug (105214) for GTK folks to look at this. Test: accessibility/button-title-uses-inner-img-alt.html Test: accessibility/focusable-div.html * accessibility/AccessibilityNodeObject.cpp: (WebCore): (WebCore::shouldUseAccessiblityObjectInnerText): (WebCore::AccessibilityNodeObject::textUnderElement): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::textUnderElement): LayoutTests: Adds new tests to show that getting inner text from an element now ignores focusable descendants and containers, but uses alternative text. Updates and rebaselines several tests to reflect the new logic. Skips these tests on GTK until support for the object replacement character can be added. * accessibility/button-title-uses-inner-img-alt-expected.txt: Added. * accessibility/button-title-uses-inner-img-alt.html: Added. * accessibility/focusable-div-expected.txt: Extended with more test cases. * accessibility/focusable-div.html: Extended with more test cases. * platform/chromium/TestExpectations: Un-skip test that now passes. * platform/chromium/accessibility/image-link-expected.txt: Rebaseline * platform/mac/accessibility/image-link-expected.txt: Rebaseline * platform/mac/accessibility/internal-link-anchors2-expected.txt: Rebaseline * platform/mac/accessibility/static-text-role-uses-text-under-element-expected.txt: Rebaseline * platform/mac/accessibility/static-text-role-uses-text-under-element.html: Fix * platform/mac/accessibility/table-with-aria-role-expected.txt: Rebaseline * platform/gtk/TestExpectations: Skip these tests until this feature is implemented for GTK. Canonical link: https://commits.webkit.org/123457@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-17 22:24:03 +00:00
This test makes sure that a generic focusable div can get accessibility focus and gets its accessible text from contents..
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.activeElement == button is true
PASS axButton.title.indexOf('Button with image of cake') >= 0 is true
PASS successfullyParsed is true
TEST COMPLETE