haikuwebkit/LayoutTests/accessibility/canvas-fallback-content.html

170 lines
5.1 KiB
HTML
Raw Permalink Normal View History

AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
<!DOCTYPE HTML>
<html>
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
<head>
Change LayoutTests' a* and b* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120985. Rubber stamped by Filip Pizlo. * accessibility/accessibility-node-memory-management.html: * accessibility/accessibility-node-reparent.html: * accessibility/accessibility-object-detached.html: * accessibility/adjacent-continuations-cause-assertion-failure.html: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-checked.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-checkbox-text.html: * accessibility/aria-combobox.html: * accessibility/aria-controls-with-tabs.html: * accessibility/aria-disabled.html: * accessibility/aria-fallback-roles.html: * accessibility/aria-help.html: * accessibility/aria-hidden-hides-all-elements.html: * accessibility/aria-hidden-update.html: * accessibility/aria-hidden-updates-alldescendants.html: * accessibility/aria-hidden-with-elements.html: * accessibility/aria-hidden.html: * accessibility/aria-invalid.html: * accessibility/aria-label.html: * accessibility/aria-labelledby-overrides-label.html: * accessibility/aria-list-and-listitem.html: * accessibility/aria-menubar-menuitems.html: * accessibility/aria-option-role.html: * accessibility/aria-presentational-role.html: * accessibility/aria-readonly.html: * accessibility/aria-required.html: * accessibility/aria-scrollbar-role.html: * accessibility/aria-sort.html: * accessibility/aria-tab-role-on-buttons.html: * accessibility/aria-tab-roles.html: * accessibility/aria-text-role.html: * accessibility/aria-toggle-button-with-title.html: * accessibility/aria-used-on-image-maps.html: * accessibility/button-title-uses-inner-img-alt.html: * accessibility/canvas-accessibilitynodeobject.html: * accessibility/canvas-description-and-role.html: * accessibility/canvas-fallback-content-2.html: * accessibility/canvas-fallback-content.html: * accessibility/color-well.html: * accessibility/container-node-delete-causes-crash.html: * accessibility/content-changed-notification-causes-crash.html: * accessibility/contenteditable-hidden-div.html: * accessibility/contenteditable-table-check-causes-crash.html: * accessibility/corresponding-control-deleted-crash.html: * accessibility/crash-adopt-node-from-new-document.html: * accessibility/crash-determining-aria-role-when-label-present.html: * accessibility/crash-with-noelement-selectbox.html: * accessibility/crashing-a-tag-in-map.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/disabled-controls-not-focusable.html: * accessibility/div-within-anchors-causes-crash.html: * accessibility/duplicate-axrenderobject-crash.html: * accessibility/duplicate-child-nodes.html: * accessibility/element-haspopup.html: * accessibility/ellipsis-text.html: * accessibility/empty-image-with-title.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/first-letter-text-transform-causes-crash.html: * accessibility/focusable-div.html: * accessibility/global-aria-attributes-invalidate-presentational.html: * accessibility/hang-in-isignored.html: * accessibility/heading-level.html: * accessibility/heading-title-includes-links.html: * accessibility/hidden-legend.html: * accessibility/html-html-element-is-ignored.html: * accessibility/html5-required-attribute.html: * accessibility/iframe-bastardization.html: * accessibility/image-map-title-causes-crash.html: * accessibility/image-map-update-parent-crash.html: * accessibility/image-map1.html: * accessibility/img-alt-tag-only-whitespace.html: * accessibility/img-aria-button-alt-tag.html: * accessibility/img-fallsback-to-title.html: * accessibility/inline-continuations.html: * accessibility/input-file-causes-crash.html: * accessibility/input-image-alt.html: * accessibility/insert-selected-option-into-select-causes-crash.html: * accessibility/label-element-press.html: * accessibility/label-for-control-hittest.html: * accessibility/legend.html: * accessibility/link-inside-button-accessible-text.html: * accessibility/listbox-enabled-states.html: * accessibility/loading-iframe-sends-notification.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/media-controls.html: * accessibility/media-element.html: * accessibility/menu-item-crash.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/meter-element.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/non-native-image-crash.html: * accessibility/noscript-ignored.html: * accessibility/notification-listeners.html: * accessibility/placeholder.html: * accessibility/platform-name.html: * accessibility/poorly-formed-aria-table.html: * accessibility/popup-button-title.html: * accessibility/presentational-elements-with-focus.html: * accessibility/press-works-on-control-types.html: * accessibility/radio-button-title-label.html: * accessibility/removed-anonymous-block-child-causes-crash.html: * accessibility/removed-continuation-element-causes-crash.html: * accessibility/render-counter-text.html: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/svg-group-element-with-title.html: * accessibility/svg-image.html: * accessibility/svg-remote-element.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-destroyed-crash.html: * accessibility/table-remove-cell-crash.html: * accessibility/table-with-empty-thead-causes-crash.html: * accessibility/table-with-hidden-head-section.html: * accessibility/table-with-mismatch-column-count-in-initial-section.html: * accessibility/text-role-with-aria-hidden-inside.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/transformed-bounds.html: * accessibility/updating-attribute-in-table-causes-crash.html: * animations/animation-css-rule-types.html: * animations/animation-events-create.html: * animations/computed-style.html: * animations/keyframes-rule.html: * animations/script-tests/TEMPLATE.html: * batterystatus/add-listener-from-callback.html: * batterystatus/basic-all-types-of-events.html: * batterystatus/basic-operation.html: * batterystatus/event-after-navigation.html: * batterystatus/multiple-frames.html: * batterystatus/updates.html: * batterystatus/window-property.html: Canonical link: https://commits.webkit.org/138878@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-08 01:18:24 +00:00
<script src="../resources/js-test-pre.js"></script>
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
<script src="../resources/accessibility-helper.js"></script>
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
AX: WebCore accessibility roles should be cross-platform https://bugs.webkit.org/show_bug.cgi?id=94870 Reviewed by Chris Fleizach. Source/WebCore: Make 5 accessibility roles cross-platform rather than GTK-only. Instead of mapping the HR tag to SplitterRole (which is an interactive splitter control on Mac), create a new role HorizontalRuleRole. Map all of the new roles to AXGroup on Mac, which matches the existing behavior. Add a new test for these roles on Chromium. Test: platform/chromium/accessibility/chromium-only-roles.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::supportsARIAAttributes): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: (atkRole): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Source/WebKit/chromium: Add a new accessibility role. * public/WebAccessibilityRole.h: * src/AssertMatchingEnums.cpp: Tools: Add debug strings to Chromium for new accessibility roles. * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp: (roleToString): LayoutTests: Adds a test for some new accessibility roles that aren't present on all platforms. * platform/chromium/accessibility/chromium-only-roles-expected.txt: Added. * platform/chromium/accessibility/chromium-only-roles.html: Added. Canonical link: https://commits.webkit.org/114035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-07 23:46:45 +00:00
<style>
myelement {
display: block;
}
</style>
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
</head>
<body>
AX: WebCore accessibility roles should be cross-platform https://bugs.webkit.org/show_bug.cgi?id=94870 Reviewed by Chris Fleizach. Source/WebCore: Make 5 accessibility roles cross-platform rather than GTK-only. Instead of mapping the HR tag to SplitterRole (which is an interactive splitter control on Mac), create a new role HorizontalRuleRole. Map all of the new roles to AXGroup on Mac, which matches the existing behavior. Add a new test for these roles on Chromium. Test: platform/chromium/accessibility/chromium-only-roles.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::supportsARIAAttributes): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: (atkRole): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Source/WebKit/chromium: Add a new accessibility role. * public/WebAccessibilityRole.h: * src/AssertMatchingEnums.cpp: Tools: Add debug strings to Chromium for new accessibility roles. * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp: (roleToString): LayoutTests: Adds a test for some new accessibility roles that aren't present on all platforms. * platform/chromium/accessibility/chromium-only-roles-expected.txt: Added. * platform/chromium/accessibility/chromium-only-roles.html: Added. Canonical link: https://commits.webkit.org/114035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-07 23:46:45 +00:00
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
<div>
<a id="link1" href="#">Link</a>
<button id="button1">Button</button>
<input id="text1" type="text">
<input id="checkbox1" type="checkbox">
<input id="radio1" type="radio">
<input id="submit1" type="submit">
<select id="combobox1"><option>1<option>2</select>
AX: WebCore accessibility roles should be cross-platform https://bugs.webkit.org/show_bug.cgi?id=94870 Reviewed by Chris Fleizach. Source/WebCore: Make 5 accessibility roles cross-platform rather than GTK-only. Instead of mapping the HR tag to SplitterRole (which is an interactive splitter control on Mac), create a new role HorizontalRuleRole. Map all of the new roles to AXGroup on Mac, which matches the existing behavior. Add a new test for these roles on Chromium. Test: platform/chromium/accessibility/chromium-only-roles.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::supportsARIAAttributes): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: (atkRole): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Source/WebKit/chromium: Add a new accessibility role. * public/WebAccessibilityRole.h: * src/AssertMatchingEnums.cpp: Tools: Add debug strings to Chromium for new accessibility roles. * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp: (roleToString): LayoutTests: Adds a test for some new accessibility roles that aren't present on all platforms. * platform/chromium/accessibility/chromium-only-roles-expected.txt: Added. * platform/chromium/accessibility/chromium-only-roles.html: Added. Canonical link: https://commits.webkit.org/114035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-07 23:46:45 +00:00
<myelement id="focusable1" tabindex="0">Focusable</myelement>
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
<div id="aria-button1" tabindex="0" role="button">ARIA button</div>
<div id="aria-link1" tabindex="0" role="link">ARIA link</div>
</div>
<canvas id="myCanvas" width="300" height="300">
<a id="link2" href="#">Link</a>
<button id="button2">Button</button>
<input id="text2" type="text">
<input id="checkbox2" type="checkbox">
<input id="radio2" type="radio">
<input id="submit2" type="submit">
<select id="combobox2"><option>1<option>2</select>
AX: WebCore accessibility roles should be cross-platform https://bugs.webkit.org/show_bug.cgi?id=94870 Reviewed by Chris Fleizach. Source/WebCore: Make 5 accessibility roles cross-platform rather than GTK-only. Instead of mapping the HR tag to SplitterRole (which is an interactive splitter control on Mac), create a new role HorizontalRuleRole. Map all of the new roles to AXGroup on Mac, which matches the existing behavior. Add a new test for these roles on Chromium. Test: platform/chromium/accessibility/chromium-only-roles.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::supportsARIAAttributes): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::determineAccessibilityRole): * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp: (atkRole): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (createAccessibilityRoleMap): Source/WebKit/chromium: Add a new accessibility role. * public/WebAccessibilityRole.h: * src/AssertMatchingEnums.cpp: Tools: Add debug strings to Chromium for new accessibility roles. * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp: (roleToString): LayoutTests: Adds a test for some new accessibility roles that aren't present on all platforms. * platform/chromium/accessibility/chromium-only-roles-expected.txt: Added. * platform/chromium/accessibility/chromium-only-roles.html: Added. Canonical link: https://commits.webkit.org/114035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-09-07 23:46:45 +00:00
<myelement id="focusable2" tabindex="0">Focusable</myelement>
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
<div id="aria-button2" tabindex="0" role="button">ARIA button</div>
<div id="aria-link2" tabindex="0" role="link">ARIA link</div>
</canvas>
<div id="console"></div>
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
<script>
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
description("This test makes sure that focusable elements in canvas fallback content are accessible.");
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
if (window.testRunner && window.accessibilityController) {
window.jsTestIsAsync = true;
window.testRunner.dumpAsText();
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
var comboBoxRole = platformRoleForComboBox(accessibilityController.platformName);
function check(id, expectedRole) {
window.element = document.getElementById(id);
element.focus();
window.axElement = accessibilityController.focusedElement;
if (axElement.role == expectedRole) {
// Do all the logging here and return true.
debug(id);
shouldBe("document.activeElement == element", "true");
shouldBe("axElement.role", "\"" + expectedRole + "\"");
debug("");
return true;
}
return false;
}
setTimeout(async function() {
// Check rendered controls.
await waitFor(() => {
return check("link1", "AXRole: AXLink");
});
await waitFor(() => {
return check("button1", "AXRole: AXButton");
});
await waitFor(() => {
return check("text1", "AXRole: AXTextField");
});
await waitFor(() => {
return check("checkbox1", "AXRole: AXCheckBox");
});
await waitFor(() => {
return check("radio1", "AXRole: AXRadioButton");
});
await waitFor(() => {
return check("submit1", "AXRole: AXButton");
});
await waitFor(() => {
return check("combobox1", comboBoxRole);
});
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode. https://bugs.webkit.org/show_bug.cgi?id=220644 Reviewed by Chris Fleizach. Source/WebCore: Tests: accessibility/canvas-fallback-content.html accessibility/canvas-fallback-content-2.html - Updates the accessibility isolated tree when the ARIA role attribute changes for a DOM element. - Modified tests to use Promises and retrieve accessible elements by IDs so that they work in both isolated tree mode on and off. * accessibility/AXLogger.cpp: (WebCore::operator<<): Added new value to the AXNotification enum. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAriaRoleChanged): Updates the isolated tree when an ARIA role attribute changes. (WebCore::AXObjectCache::updateIsolatedTree): Handles the AXAriaRoleChanged notification. * accessibility/AXObjectCache.h: LayoutTests: * accessibility/canvas-fallback-content-2-expected.txt: Removed the checks for the document.activeElement since the goal here is not to test this method. * accessibility/canvas-fallback-content-2.html: Retrieved the accessibility Objects by ID directly from the accessibilityController. This simplifies the code since it is not necessary to set focus to the object via the document, to then retrieve the focused accessibility element. This works for isolated tree mode on and off. * accessibility/canvas-fallback-content.html: Kept the focus manipulations but used Promises to make it work in both isolated mode on and off. * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted. * platform/win/TestExpectations: Skip since this test was already failing in win. Canonical link: https://commits.webkit.org/233123@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-18 23:54:57 +00:00
await waitFor(() => {
return check("focusable1", "AXRole: AXGroup");
});
await waitFor(() => {
return check("aria-button1", "AXRole: AXButton");
});
await waitFor(() => {
return check("aria-link1", "AXRole: AXLink");
});
// Check unrendered controls inside a canvas.
await waitFor(() => {
return check("link2", "AXRole: AXLink");
});
await waitFor(() => {
return check("button2", "AXRole: AXButton");
});
await waitFor(() => {
return check("text2", "AXRole: AXTextField");
});
await waitFor(() => {
return check("checkbox2", "AXRole: AXCheckBox");
});
await waitFor(() => {
return check("radio2", "AXRole: AXRadioButton");
});
await waitFor(() => {
return check("submit2", "AXRole: AXButton");
});
await waitFor(() => {
return check("combobox2", comboBoxRole);
});
await waitFor(() => {
return check("focusable2", "AXRole: AXGroup");
});
await waitFor(() => {
return check("aria-button2", "AXRole: AXButton");
});
await waitFor(() => {
return check("aria-link2", "AXRole: AXLink");
});
// Check that the role is updated when the element changes.
document.getElementById('focusable1').setAttribute('role', 'button');
await waitFor(() => {
return check("focusable1", "AXRole: AXButton");
});
document.getElementById('focusable2').setAttribute('role', 'button');
await waitFor(() => {
return check("focusable2", "AXRole: AXButton");
});
finishJSTest();
}, 0);
}
</script>
Change LayoutTests' a* and b* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120985. Rubber stamped by Filip Pizlo. * accessibility/accessibility-node-memory-management.html: * accessibility/accessibility-node-reparent.html: * accessibility/accessibility-object-detached.html: * accessibility/adjacent-continuations-cause-assertion-failure.html: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-checked.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-checkbox-text.html: * accessibility/aria-combobox.html: * accessibility/aria-controls-with-tabs.html: * accessibility/aria-disabled.html: * accessibility/aria-fallback-roles.html: * accessibility/aria-help.html: * accessibility/aria-hidden-hides-all-elements.html: * accessibility/aria-hidden-update.html: * accessibility/aria-hidden-updates-alldescendants.html: * accessibility/aria-hidden-with-elements.html: * accessibility/aria-hidden.html: * accessibility/aria-invalid.html: * accessibility/aria-label.html: * accessibility/aria-labelledby-overrides-label.html: * accessibility/aria-list-and-listitem.html: * accessibility/aria-menubar-menuitems.html: * accessibility/aria-option-role.html: * accessibility/aria-presentational-role.html: * accessibility/aria-readonly.html: * accessibility/aria-required.html: * accessibility/aria-scrollbar-role.html: * accessibility/aria-sort.html: * accessibility/aria-tab-role-on-buttons.html: * accessibility/aria-tab-roles.html: * accessibility/aria-text-role.html: * accessibility/aria-toggle-button-with-title.html: * accessibility/aria-used-on-image-maps.html: * accessibility/button-title-uses-inner-img-alt.html: * accessibility/canvas-accessibilitynodeobject.html: * accessibility/canvas-description-and-role.html: * accessibility/canvas-fallback-content-2.html: * accessibility/canvas-fallback-content.html: * accessibility/color-well.html: * accessibility/container-node-delete-causes-crash.html: * accessibility/content-changed-notification-causes-crash.html: * accessibility/contenteditable-hidden-div.html: * accessibility/contenteditable-table-check-causes-crash.html: * accessibility/corresponding-control-deleted-crash.html: * accessibility/crash-adopt-node-from-new-document.html: * accessibility/crash-determining-aria-role-when-label-present.html: * accessibility/crash-with-noelement-selectbox.html: * accessibility/crashing-a-tag-in-map.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/disabled-controls-not-focusable.html: * accessibility/div-within-anchors-causes-crash.html: * accessibility/duplicate-axrenderobject-crash.html: * accessibility/duplicate-child-nodes.html: * accessibility/element-haspopup.html: * accessibility/ellipsis-text.html: * accessibility/empty-image-with-title.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/first-letter-text-transform-causes-crash.html: * accessibility/focusable-div.html: * accessibility/global-aria-attributes-invalidate-presentational.html: * accessibility/hang-in-isignored.html: * accessibility/heading-level.html: * accessibility/heading-title-includes-links.html: * accessibility/hidden-legend.html: * accessibility/html-html-element-is-ignored.html: * accessibility/html5-required-attribute.html: * accessibility/iframe-bastardization.html: * accessibility/image-map-title-causes-crash.html: * accessibility/image-map-update-parent-crash.html: * accessibility/image-map1.html: * accessibility/img-alt-tag-only-whitespace.html: * accessibility/img-aria-button-alt-tag.html: * accessibility/img-fallsback-to-title.html: * accessibility/inline-continuations.html: * accessibility/input-file-causes-crash.html: * accessibility/input-image-alt.html: * accessibility/insert-selected-option-into-select-causes-crash.html: * accessibility/label-element-press.html: * accessibility/label-for-control-hittest.html: * accessibility/legend.html: * accessibility/link-inside-button-accessible-text.html: * accessibility/listbox-enabled-states.html: * accessibility/loading-iframe-sends-notification.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/media-controls.html: * accessibility/media-element.html: * accessibility/menu-item-crash.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/meter-element.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/non-native-image-crash.html: * accessibility/noscript-ignored.html: * accessibility/notification-listeners.html: * accessibility/placeholder.html: * accessibility/platform-name.html: * accessibility/poorly-formed-aria-table.html: * accessibility/popup-button-title.html: * accessibility/presentational-elements-with-focus.html: * accessibility/press-works-on-control-types.html: * accessibility/radio-button-title-label.html: * accessibility/removed-anonymous-block-child-causes-crash.html: * accessibility/removed-continuation-element-causes-crash.html: * accessibility/render-counter-text.html: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/svg-group-element-with-title.html: * accessibility/svg-image.html: * accessibility/svg-remote-element.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-destroyed-crash.html: * accessibility/table-remove-cell-crash.html: * accessibility/table-with-empty-thead-causes-crash.html: * accessibility/table-with-hidden-head-section.html: * accessibility/table-with-mismatch-column-count-in-initial-section.html: * accessibility/text-role-with-aria-hidden-inside.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/transformed-bounds.html: * accessibility/updating-attribute-in-table-causes-crash.html: * animations/animation-css-rule-types.html: * animations/animation-events-create.html: * animations/computed-style.html: * animations/keyframes-rule.html: * animations/script-tests/TEMPLATE.html: * batterystatus/add-listener-from-callback.html: * batterystatus/basic-all-types-of-events.html: * batterystatus/basic-operation.html: * batterystatus/event-after-navigation.html: * batterystatus/multiple-frames.html: * batterystatus/updates.html: * batterystatus/window-property.html: Canonical link: https://commits.webkit.org/138878@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-08 01:18:24 +00:00
<script src="../resources/js-test-post.js"></script>
AX: Calls to AXObjectCache should prefer Node over Renderer https://bugs.webkit.org/show_bug.cgi?id=91794 Reviewed by Chris Fleizach. Source/WebCore: Now that it's possible for nodes inside a canvas subtree to be focused and represent accessible content, accessibility notifications should be triggered with a Node* rather than with a RenderObject* whenever possible. Every public API in AXObjectCache that took a RenderObject* before now either takes a Node* instead, or has a parallel method that takes a Node*. Tests: accessibility/accessibility-node-memory-management.html accessibility/accessibility-node-reparent.html accessibility/canvas-fallback-content.html * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedImageMapUIElement): (WebCore::AXObjectCache::focusedUIElementForPage): (WebCore::AXObjectCache::get): (WebCore::AXObjectCache::getOrCreate): (WebCore::AXObjectCache::contentChanged): (WebCore): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::selectedChildrenChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): (WebCore::AXObjectCache::rootAXEditableElement): (WebCore::AXObjectCache::nodeIsTextControl): * accessibility/AXObjectCache.h: (AXObjectCache): (WebCore::AXObjectCache::setNodeInUse): (WebCore::AXObjectCache::removeNodeForUse): (WebCore::AXObjectCache::isNodeInUse): (WebCore::AXObjectCache::checkedStateChanged): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::contentChanged): (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached): (WebCore::AXObjectCache::handleActiveDescendantChanged): (WebCore::AXObjectCache::handleAriaExpandedChange): (WebCore::AXObjectCache::handleAriaRoleChanged): (WebCore::AXObjectCache::handleFocusedUIElementChanged): (WebCore::AXObjectCache::nodeTextChangeNotification): (WebCore::AXObjectCache::postNotification): (WebCore::AXObjectCache::selectedChildrenChanged): * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::parentObject): * accessibility/AccessibilityObject.cpp: (WebCore::appendAccessibilityObject): (WebCore::replacedNodeNeedsCharacter): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::menuForMenuButton): (WebCore::AccessibilityRenderObject::menuButtonForMenu): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers): (WebCore::AccessibilityRenderObject::titleUIElement): (WebCore::AccessibilityRenderObject::isTabItemSelected): (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::activeDescendant): (WebCore::AccessibilityRenderObject::correspondingControlForLabelElement): (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::webAreaObject): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/chromium/AXObjectCacheChromium.cpp: (WebCore::AXObjectCache::postPlatformNotification): (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * accessibility/win/AXObjectCacheWin.cpp: (WebCore::AXObjectCache::handleFocusedUIElementChanged): * bindings/cpp/WebDOMCustomVoidCallback.cpp: (toWebCore): * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Node.cpp: (WebCore::Node::~Node): (WebCore::Node::attach): * editing/AppendNodeCommand.cpp: (WebCore::sendAXTextChangedIgnoringLineBreaks): * editing/DeleteFromTextNodeCommand.cpp: (WebCore::DeleteFromTextNodeCommand::doApply): (WebCore::DeleteFromTextNodeCommand::doUnapply): * editing/Editor.cpp: (WebCore::Editor::respondToChangedContents): (WebCore::Editor::markAndReplaceFor): * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): (WebCore::InsertIntoTextNodeCommand::doUnapply): * editing/InsertNodeBeforeCommand.cpp: (WebCore::InsertNodeBeforeCommand::doApply): (WebCore::InsertNodeBeforeCommand::doUnapply): * editing/chromium/FrameSelectionChromium.cpp: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged): (WebCore::HTMLSelectElement::optionElementChildrenChanged): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::setInnerTextValue): * html/InputType.cpp: (WebCore::InputType::applyStep): * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): * page/FocusController.cpp: (WebCore::FocusController::setInitialFocus): LayoutTests: New tests: - canvas-fallback-content tests that objects in a canvas subtree can be focused and then you can retrieve the role of the accessible object. - accessibility-node-memory-management ensures that an AccessibilityNodeObject is detached when its node is destroyed. - accessibility-node-reparent ensures that if an AccessibilityNodeObject is created for a node without a renderer, but the node later gets a renderer, the AccessibilityNodeObject is detached and an AccessibilityRenderObject is created instead. * accessibility/accessibility-node-memory-management-expected.txt: Added. * accessibility/accessibility-node-memory-management.html: Added. * accessibility/accessibility-node-reparent-expected.txt: Added. * accessibility/accessibility-node-reparent.html: Added. * accessibility/canvas-fallback-content-expected.txt: Added. * accessibility/canvas-fallback-content.html: Added. * platform/gtk/TestExpectations: Canonical link: https://commits.webkit.org/111968@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-15 21:31:35 +00:00
</body>
</html>