haikuwebkit/LayoutTests/accessibility/focusable-div-expected.txt

28 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

This test makes sure that a generic focusable div can get accessibility focus. It should not get accessible text from its children automatically though.
AX: Focusable elements without a role should not be ignored https://bugs.webkit.org/show_bug.cgi?id=94302 Reviewed by Chris Fleizach. Source/WebCore: Changes the accessibility logic so that a generic element that's focusable is not ignored for accessibility, and returns its inner text as its title. That way if you Tab to the element, a reasonable accessibility notification is generated. One exception is the body element, because focusing the body is equivalent to blurring the current focused element and does not result in a "focus" accessibility notification. Also fixes logic that determined if an element was contentEditable by making sure it catches the case with no attribute value (e.g. <div contentEditable>), which also implies contentEditable=true according to the spec. Test: accessibility/focusable-div.html * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::nodeHasContentEditableAttributeSet): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): LayoutTests: Adds a new test to make sure that a generic focusable element (like a div with tabindex=0) can get focus and return an appropriate title, just like a form control or element with an ARIA role. Modifies three existing tests that were previously assuming that a focusable node with no role would be ignored for accessibility ("accessibilityIsIgnored"). * accessibility/editable-webarea-context-menu-point.html: * accessibility/focusable-div-expected.txt: Added. * accessibility/focusable-div.html: Added. * accessibility/table-detection.html: * platform/mac/accessibility/listbox-hit-test.html: Canonical link: https://commits.webkit.org/113145@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-29 07:56:45 +00:00
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS document.activeElement == link is true
PASS lastChar(axLink.title) is "A"
PASS document.activeElement == div is true
PASS lastChar(axDiv.title) is ' '
AX: Focusable elements without a role should not be ignored https://bugs.webkit.org/show_bug.cgi?id=94302 Reviewed by Chris Fleizach. Source/WebCore: Changes the accessibility logic so that a generic element that's focusable is not ignored for accessibility, and returns its inner text as its title. That way if you Tab to the element, a reasonable accessibility notification is generated. One exception is the body element, because focusing the body is equivalent to blurring the current focused element and does not result in a "focus" accessibility notification. Also fixes logic that determined if an element was contentEditable by making sure it catches the case with no attribute value (e.g. <div contentEditable>), which also implies contentEditable=true according to the spec. Test: accessibility/focusable-div.html * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::nodeHasContentEditableAttributeSet): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): LayoutTests: Adds a new test to make sure that a generic focusable element (like a div with tabindex=0) can get focus and return an appropriate title, just like a form control or element with an ARIA role. Modifies three existing tests that were previously assuming that a focusable node with no role would be ignored for accessibility ("accessibilityIsIgnored"). * accessibility/editable-webarea-context-menu-point.html: * accessibility/focusable-div-expected.txt: Added. * accessibility/focusable-div.html: Added. * accessibility/table-detection.html: * platform/mac/accessibility/listbox-hit-test.html: Canonical link: https://commits.webkit.org/113145@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-29 07:56:45 +00:00
PASS document.activeElement == div2 is true
PASS lastChar(axDiv2.title) is ' '
AX: Focusable elements without a role should not be ignored https://bugs.webkit.org/show_bug.cgi?id=94302 Reviewed by Chris Fleizach. Source/WebCore: Changes the accessibility logic so that a generic element that's focusable is not ignored for accessibility, and returns its inner text as its title. That way if you Tab to the element, a reasonable accessibility notification is generated. One exception is the body element, because focusing the body is equivalent to blurring the current focused element and does not result in a "focus" accessibility notification. Also fixes logic that determined if an element was contentEditable by making sure it catches the case with no attribute value (e.g. <div contentEditable>), which also implies contentEditable=true according to the spec. Test: accessibility/focusable-div.html * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::nodeHasContentEditableAttributeSet): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): LayoutTests: Adds a new test to make sure that a generic focusable element (like a div with tabindex=0) can get focus and return an appropriate title, just like a form control or element with an ARIA role. Modifies three existing tests that were previously assuming that a focusable node with no role would be ignored for accessibility ("accessibilityIsIgnored"). * accessibility/editable-webarea-context-menu-point.html: * accessibility/focusable-div-expected.txt: Added. * accessibility/focusable-div.html: Added. * accessibility/table-detection.html: * platform/mac/accessibility/listbox-hit-test.html: Canonical link: https://commits.webkit.org/113145@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-29 07:56:45 +00:00
PASS document.activeElement == div3 is true
AX: Layout tests related to text alternative computation need to be done differently https://bugs.webkit.org/show_bug.cgi?id=157187 Create several utility methods to facilitate retrieval of platform-independent attribute values from platform-specific attributes: - platformValueForW3CName() and platformValueForW3CDescription() to retrieve a specific piece of text alternative information, stripping off the platform attribute name by default. These methods should make it possible to share tests and expectations files because the text alternative calculation defined by the W3C accessibility specifications should be the same for all platforms. (The differences are the result of the unique platform mappings.) - platformTextAlternatives() to dump out all the text alternative attributes and values, preserving the platform-specific attribute name. This, along with the use of the platformValue* methods with attribute name enabled, should make it possible to have shared tests with platform-specific expectations without the need to check the platform in the test itself. - platformRoleForComboBox() and platformRoleForStaticText() to eliminate the need for platform-specific expectations files simply because such an element happens to be included in the test file and verifying that element's role is desired. Begin using these methods in the tests related to text alternative computation which had platform-specific checks, update the expectations files when needed, and remove now-obsolete platform-specific expectations files. Reviewed by Chris Fleizach. * accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Updated. * accessibility/alt-tag-on-image-with-nonimage-role.html: Updated. * accessibility/aria-help-expected.txt: Added. * accessibility/aria-help.html: Updated. * accessibility/aria-label-expected.txt: Updated. * accessibility/aria-label.html: Updated. * accessibility/aria-labeled-with-hidden-node-expected.txt: Updated. * accessibility/aria-labeled-with-hidden-node.html: Updated. * accessibility/aria-labelledby-on-input-expected.txt: Updated. * accessibility/aria-labelledby-on-input.html: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Updated. * accessibility/aria-labelledby-overrides-aria-labeledby.html: Updated. * accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * accessibility/aria-labelledby-overrides-label.html: Updated. * accessibility/aria-labelledby-stay-within-expected.txt: Updated. * accessibility/aria-labelledby-stay-within.html: Updated. * accessibility/aria-labelledby-with-descendants-expected.txt: Updated. * accessibility/aria-labelledby-with-descendants.html: Updated. * accessibility/aria-namefrom-author-expected.txt: Updated. * accessibility/aria-namefrom-author.html: Updated. * accessibility/aria-text-role-expected.txt: Updated. * accessibility/aria-text-role.html: Updated. * accessibility/canvas-description-and-role-expected.txt: Updated. * accessibility/canvas-description-and-role.html: Updated. * accessibility/canvas-fallback-content.html: Updated. * accessibility/empty-image-with-title-expected.txt: Updated. * accessibility/empty-image-with-title.html: Updated. * accessibility/fieldset-element-expected.txt: Updated. * accessibility/fieldset-element.html: Updated. * accessibility/focusable-div-expected.txt: Updated. * accessibility/focusable-div.html: Updated. * accessibility/help-text.html: Updated. * accessibility/img-alt-tag-only-whitespace-expected.txt: Updated. * accessibility/img-alt-tag-only-whitespace.html: Updated. * accessibility/img-aria-button-alt-tag-expected.txt: Updated. * accessibility/img-aria-button-alt-tag.html: Updated. * accessibility/img-fallsback-to-title.html: Updated. * accessibility/input-image-alt-expected.txt: Updated. * accessibility/input-image-alt.html: Updated. * accessibility/loading-iframe-sends-notification.html: Updated. * accessibility/self-referencing-aria-labelledby-expected.txt: Updated. * accessibility/self-referencing-aria-labelledby.html: Updated. * accessibility/svg-bounds.html: Updated. * accessibility/svg-group-element-with-title-expected.txt: Updated. * accessibility/svg-group-element-with-title.html: Updated. * accessibility/svg-image-expected.txt: Updated. * accessibility/svg-image.html: Updated. * accessibility/svg-labelledby-expected.txt: Updated. * accessibility/svg-labelledby.html: Updated. * accessibility/svg-remote-element.html: Updated. * accessibility/w3c-svg-description-calculation.html: Updated. * accessibility/w3c-svg-name-calculation.html: Updated. * platform/gtk/accessibility/alt-tag-on-image-with-nonimage-role-expected.txt: Removed. * platform/gtk/accessibility/aria-labeled-with-hidden-node-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-on-input-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-aria-labeledby-expected.txt: Removed. * platform/gtk/accessibility/aria-labelledby-overrides-label-expected.txt: Updated. * platform/gtk/accessibility/aria-labelledby-with-descendants-expected.txt: Removed. * platform/gtk/accessibility/aria-namefrom-author-expected.txt: Removed. * platform/gtk/accessibility/aria-text-role-expected.txt: Removed. * platform/gtk/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/gtk/accessibility/empty-image-with-title-expected.txt: Updated. * platform/gtk/accessibility/fieldset-element-expected.txt: Removed. * platform/gtk/accessibility/focusable-div-expected.txt: Removed. * platform/gtk/accessibility/img-alt-tag-only-whitespace-expected.txt: Removed. * platform/gtk/accessibility/img-aria-button-alt-tag-expected.txt: Removed. * platform/gtk/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/gtk/accessibility/input-image-alt-expected.txt: Removed. * platform/gtk/accessibility/self-referencing-aria-labelledby-expected.txt: Removed. * platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Removed. * platform/gtk/accessibility/svg-image-expected.txt: Removed. * platform/gtk/accessibility/svg-labelledby-expected.txt: Removed. * platform/mac/accessibility/aria-help-expected.txt: Removed. * platform/mac/accessibility/aria-labelledby-overrides-label-expected.txt: Removed. * platform/mac/accessibility/canvas-description-and-role-expected.txt: Updated. * platform/mac/accessibility/fieldset-element-expected.txt: Removed. * platform/mac/accessibility/img-fallsback-to-title-expected.txt: Updated. * platform/win/accessibility/canvas-description-and-role-expected.txt: Updated. * resources/accessibility-helper.js: (platformValueForW3CName): Added. (platformValueForW3CDescription): Added. (platformTextAlternatives): Added. (platformRoleForComboBox): Added. (platformRoleForStaticText): Added. Canonical link: https://commits.webkit.org/176061@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-20 18:34:14 +00:00
PASS lastChar(accNameForDiv3) is "D"
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
PASS document.activeElement == div4 is true
PASS axDiv4.title.indexOf('Link') is -1
PASS document.activeElement == div5 is true
PASS axDiv5.title.indexOf('Link') is -1
PASS axDiv5.title.indexOf('Initial text before link') >= 0 is false
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
PASS document.activeElement == div6 is true
PASS axDiv6.title.indexOf('List item') is -1
PASS document.activeElement == div7 is true
PASS axDiv7.title.indexOf('List item') is -1
PASS axDiv7.title.indexOf('Initial text before list') >= 0 is false
AX: Focusable elements without a role should not be ignored https://bugs.webkit.org/show_bug.cgi?id=94302 Reviewed by Chris Fleizach. Source/WebCore: Changes the accessibility logic so that a generic element that's focusable is not ignored for accessibility, and returns its inner text as its title. That way if you Tab to the element, a reasonable accessibility notification is generated. One exception is the body element, because focusing the body is equivalent to blurring the current focused element and does not result in a "focus" accessibility notification. Also fixes logic that determined if an element was contentEditable by making sure it catches the case with no attribute value (e.g. <div contentEditable>), which also implies contentEditable=true according to the spec. Test: accessibility/focusable-div.html * accessibility/AccessibilityRenderObject.cpp: (WebCore): (WebCore::nodeHasContentEditableAttributeSet): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): LayoutTests: Adds a new test to make sure that a generic focusable element (like a div with tabindex=0) can get focus and return an appropriate title, just like a form control or element with an ARIA role. Modifies three existing tests that were previously assuming that a focusable node with no role would be ignored for accessibility ("accessibilityIsIgnored"). * accessibility/editable-webarea-context-menu-point.html: * accessibility/focusable-div-expected.txt: Added. * accessibility/focusable-div.html: Added. * accessibility/table-detection.html: * platform/mac/accessibility/listbox-hit-test.html: Canonical link: https://commits.webkit.org/113145@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-29 07:56:45 +00:00
PASS successfullyParsed is true
TEST COMPLETE