Changeset 244029 in webkit
- Timestamp:
- Apr 8, 2019 11:09:33 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r244026 r244029 1 2019-04-08 Eric Liang <ericliang@apple.com> 2 3 AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups 4 https://bugs.webkit.org/show_bug.cgi?id=156774 5 6 Reviewed by Chris Fleizach. 7 8 Added tests that verify svgs shapes that are labelled are exposed as images. 9 * accessibility/resources/apple-logo.svg: Added. 10 * accessibility/svg-shape-labelled-expected.txt: Added. 11 * accessibility/svg-shape-labelled.html: Added. 12 1 13 2019-04-08 Shawn Roberts <sroberts@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r244027 r244029 1 2019-04-08 Eric Liang <ericliang@apple.com> 2 3 AX: <svg> elements with labels and no accessible contents are exposed as empty AXGroups 4 https://bugs.webkit.org/show_bug.cgi?id=156774 5 6 Reviewed by Chris Fleizach. 7 8 Labelled SVGs without accessible descendants are exposed as AXImage rather than groups. 9 10 Unlabelled equivalents are not exposed. Otherwise, SVGs with accessible descendants are exposed as AXGroup. 11 Also added back functionalities from last patch of determining whether a SVG element should be ignored. 12 13 Test: accessibility/svg-shape-labelled.html 14 15 * accessibility/AccessibilityRenderObject.cpp: 16 (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation): 17 * accessibility/AccessibilitySVGElement.cpp: 18 (WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const): 19 1 20 2019-04-08 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r243894 r244029 3264 3264 { 3265 3265 // If a menu does not have valid menuitem children, it should not be exposed as a menu. 3266 if (roleValue() == AccessibilityRole::Menu) { 3266 auto role = roleValue(); 3267 if (role == AccessibilityRole::Menu) { 3267 3268 // Elements marked as menus must have at least one menu item child. 3268 3269 size_t menuItemCount = 0; … … 3277 3278 m_role = AccessibilityRole::Group; 3278 3279 } 3280 if (role == AccessibilityRole::SVGRoot && !hasChildren()) 3281 m_role = AccessibilityRole::Image; 3279 3282 } 3280 3283 -
trunk/Source/WebCore/accessibility/AccessibilitySVGElement.cpp
r241321 r244029 246 246 // SVG shapes should not be included unless there's a concrete reason for inclusion. 247 247 // https://rawgit.com/w3c/aria/master/svg-aam/svg-aam.html#exclude_elements 248 if (m_renderer->isSVGShape()) 249 return !(hasAttributesRequiredForInclusion() || canSetFocusAttribute() || element()->hasEventListeners()); 248 if (m_renderer->isSVGShape()) { 249 if (canSetFocusAttribute() || element()->hasEventListeners()) 250 return false; 251 if (auto svgParent = AccessibilityObject::matchedParent(*this, true, [] (const AccessibilityObject& object) { 252 return object.hasAttributesRequiredForInclusion() || object.isAccessibilitySVGRoot(); 253 })) 254 return !svgParent->hasAttributesRequiredForInclusion(); 255 return true; 256 } 250 257 251 258 return AccessibilityRenderObject::computeAccessibilityIsIgnored();
Note: See TracChangeset
for help on using the changeset viewer.