haikuwebkit/LayoutTests/accessibility/aria-labelledby-overrides-l...

13 lines
408 B
Plaintext
Raw Permalink Normal View History

[GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline https://bugs.webkit.org/show_bug.cgi?id=105638 Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2013-01-09 Reviewed by Martin Robinson. The test was failing for two reasons: - AccessibilityRenderObject::correspondingLabelForControlElement() was not ignoring the ARIA labelled-by property - AccessibilityController::accessibleElementById() was not implemented Because getting an element by ID cannot be done in the UIProcess, the decision was made to expose the element's ID as an accessible attribute of the object. In addition, fixing the bug in AccessibilityRenderObject made it possible to eliminate the Gtk platform-specific expectations for another test. Source/WebCore: No new tests; instead, the failing test was unskipped and a proper baseline provided. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): Return null for objects where hasTextAlternative() is true. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): Expose the element's ID as an accessible attribute. Tools: * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp: (childElementById): Added. Walks the tree looking for the AtkObject Attribute which exposes the HTML element's ID. (AccessibilityController::accessibleElementById): Implemented. * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: (AccessibilityUIElement::title): Modified to print out "AXTitle: " even when there is no title, as is done with the Mac port. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR): * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: (WTR::childElementById): Added. Walks the tree looking for the AtkObject Attribute which exposes the HTML element's ID. (WTR): (WTR::AccessibilityController::accessibleElementById): Implemented. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::title): Modified to print out "AXTitle: " even when there is no title, as is done with the Mac port. LayoutTests: * accessibility/aria-labelledby-overrides-label-expected.txt: Added. * accessibility/radio-button-title-label-expected.txt: Modified based on null check which was added and which gets included in the test output. * accessibility/radio-button-title-label.html: Check to see that we have a titleUIElement before attempting to get its title. * platform/gtk/TestExpectations: Unskipped the previously failing test. * platform/gtk/accessibility/radio-button-title-label-expected.txt: Removed. Canonical link: https://commits.webkit.org/124699@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-10 00:09:41 +00:00
This tests that if aria-labelledby is used, then label elements are not used
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
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 platformValueForW3CName(text) is "Shut down computer after 10 minutes"
[GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline https://bugs.webkit.org/show_bug.cgi?id=105638 Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2013-01-09 Reviewed by Martin Robinson. The test was failing for two reasons: - AccessibilityRenderObject::correspondingLabelForControlElement() was not ignoring the ARIA labelled-by property - AccessibilityController::accessibleElementById() was not implemented Because getting an element by ID cannot be done in the UIProcess, the decision was made to expose the element's ID as an accessible attribute of the object. In addition, fixing the bug in AccessibilityRenderObject made it possible to eliminate the Gtk platform-specific expectations for another test. Source/WebCore: No new tests; instead, the failing test was unskipped and a proper baseline provided. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): Return null for objects where hasTextAlternative() is true. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): Expose the element's ID as an accessible attribute. Tools: * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp: (childElementById): Added. Walks the tree looking for the AtkObject Attribute which exposes the HTML element's ID. (AccessibilityController::accessibleElementById): Implemented. * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: (AccessibilityUIElement::title): Modified to print out "AXTitle: " even when there is no title, as is done with the Mac port. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR): * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: (WTR::childElementById): Added. Walks the tree looking for the AtkObject Attribute which exposes the HTML element's ID. (WTR): (WTR::AccessibilityController::accessibleElementById): Implemented. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::title): Modified to print out "AXTitle: " even when there is no title, as is done with the Mac port. LayoutTests: * accessibility/aria-labelledby-overrides-label-expected.txt: Added. * accessibility/radio-button-title-label-expected.txt: Modified based on null check which was added and which gets included in the test output. * accessibility/radio-button-title-label.html: Check to see that we have a titleUIElement before attempting to get its title. * platform/gtk/TestExpectations: Unskipped the previously failing test. * platform/gtk/accessibility/radio-button-title-label-expected.txt: Removed. Canonical link: https://commits.webkit.org/124699@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-10 00:09:41 +00:00
PASS text.titleUIElement() != null && text.titleUIElement().isValid is false
AX: Form label text should be exposed as static text if it contains only static text https://bugs.webkit.org/show_bug.cgi?id=158634 Reviewed by Chris Fleizach. Use AccessibilityLabel to represent HTMLLabelElement to assistive technology. AccessibilityLabel::containsOnlyStaticText() searches label subtree to evaluate if all children are static text. AccessibilityLabel::stringValue() consults containsOnlyStaticText() and returns textUnderElement() if true. WebAccessibilityObjectWrapperMac consults containsOnlyStaticText() and substitutes StaticTextRole for LabelRole if true. Cache containsOnlyStaticText() in the common case when updating children. Source/WebCore: Tests: accessibility/mac/label-element-all-text-string-value.html accessibility/mac/label-element-with-link-string-value.html * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * accessibility/AXObjectCache.cpp: (WebCore::createFromRenderer): * accessibility/AccessibilityAllInOne.cpp: * accessibility/AccessibilityLabel.cpp: Added. (WebCore::AccessibilityLabel::AccessibilityLabel): (WebCore::AccessibilityLabel::~AccessibilityLabel): (WebCore::AccessibilityLabel::create): (WebCore::AccessibilityLabel::computeAccessibilityIsIgnored): (WebCore::AccessibilityLabel::stringValue): (WebCore::childrenContainOnlyStaticText): (WebCore::AccessibilityLabel::containsOnlyStaticText): (WebCore::AccessibilityLabel::updateChildrenIfNecessary): (WebCore::AccessibilityLabel::clearChildren): (WebCore::AccessibilityLabel::insertChild): * accessibility/AccessibilityLabel.h: Added. * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isLabel): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper role]): LayoutTests: * accessibility/aria-labelledby-overrides-label-expected.txt: * accessibility/mac/label-element-all-text-string-value-expected.txt: Added. * accessibility/mac/label-element-all-text-string-value.html: Added. * accessibility/mac/label-element-with-hidden-control-expected.txt: * accessibility/mac/label-element-with-hidden-control.html: * accessibility/mac/label-element-with-link-string-value-expected.txt: Added. * accessibility/mac/label-element-with-link-string-value.html: Added. * accessibility/mac/slider-allows-title-ui-element-expected.txt: * accessibility/mac/slider-allows-title-ui-element.html: Canonical link: https://commits.webkit.org/176842@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-06-14 21:28:37 +00:00
Label element role is: AXRole: AXStaticText
[GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline https://bugs.webkit.org/show_bug.cgi?id=105638 Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2013-01-09 Reviewed by Martin Robinson. The test was failing for two reasons: - AccessibilityRenderObject::correspondingLabelForControlElement() was not ignoring the ARIA labelled-by property - AccessibilityController::accessibleElementById() was not implemented Because getting an element by ID cannot be done in the UIProcess, the decision was made to expose the element's ID as an accessible attribute of the object. In addition, fixing the bug in AccessibilityRenderObject made it possible to eliminate the Gtk platform-specific expectations for another test. Source/WebCore: No new tests; instead, the failing test was unskipped and a proper baseline provided. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): Return null for objects where hasTextAlternative() is true. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (webkitAccessibleGetAttributes): Expose the element's ID as an accessible attribute. Tools: * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp: (childElementById): Added. Walks the tree looking for the AtkObject Attribute which exposes the HTML element's ID. (AccessibilityController::accessibleElementById): Implemented. * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp: (AccessibilityUIElement::title): Modified to print out "AXTitle: " even when there is no title, as is done with the Mac port. * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: (WTR): * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: (WTR::childElementById): Added. Walks the tree looking for the AtkObject Attribute which exposes the HTML element's ID. (WTR): (WTR::AccessibilityController::accessibleElementById): Implemented. * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::title): Modified to print out "AXTitle: " even when there is no title, as is done with the Mac port. LayoutTests: * accessibility/aria-labelledby-overrides-label-expected.txt: Added. * accessibility/radio-button-title-label-expected.txt: Modified based on null check which was added and which gets included in the test output. * accessibility/radio-button-title-label.html: Check to see that we have a titleUIElement before attempting to get its title. * platform/gtk/TestExpectations: Unskipped the previously failing test. * platform/gtk/accessibility/radio-button-title-label-expected.txt: Removed. Canonical link: https://commits.webkit.org/124699@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-10 00:09:41 +00:00
PASS successfullyParsed is true
TEST COMPLETE