Changeset 284844 in webkit
- Timestamp:
- Oct 25, 2021, 4:20:28 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/img-no-alt-not-ignored-with-title-expected.txt (added)
-
LayoutTests/accessibility/img-no-alt-not-ignored-with-title.html (added)
-
LayoutTests/platform/ios-simulator/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/win/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityRenderObject.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r284842 r284844 1 2021-10-25 Chris Fleizach <cfleizach@apple.com> 2 3 WebKit should use img@title as label even if img@alt is exlicitly empty 4 https://bugs.webkit.org/show_bug.cgi?id=173870 5 <rdar://problem/33010427> 6 7 Reviewed by Andres Gonzalez. 8 9 * accessibility/img-no-alt-not-ignored-with-title-expected.txt: Added. 10 * accessibility/img-no-alt-not-ignored-with-title.html: Added. 11 * platform/ios-simulator/TestExpectations: 12 * platform/win/TestExpectations: 13 1 14 2021-10-25 Eric Hutchison <ehutchison@apple.com> 2 15 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r284752 r284844 4 4 # 5 5 6 accessibility/img-no-alt-not-ignored-with-title.html [ Pass ] 6 7 accessibility/insert-newline.html [ Pass ] 7 8 accessibility/url-test.html [ Pass ] -
trunk/LayoutTests/platform/win/TestExpectations
r284731 r284844 275 275 accessibility/listbox-clear-selection.html [ Skip ] 276 276 accessibility/embedded-image-description.html [ Skip ] 277 accessibility/img-no-alt-not-ignored-with-title.html [ Skip ] 277 278 278 279 # TODO Conic gradients -
trunk/Source/WebCore/ChangeLog
r284822 r284844 1 2021-10-25 Chris Fleizach <cfleizach@apple.com> 2 3 WebKit should use img@title as label even if img@alt is exlicitly empty 4 https://bugs.webkit.org/show_bug.cgi?id=173870 5 <rdar://problem/33010427> 6 7 Reviewed by Andres Gonzalez. 8 9 alt="" usually means to ignore an image. However, when it also carries other 10 descriptive attributes, that is probably the wrong decision. 11 Other browsers are not ignoring these images, WebKit should follow suit. 12 13 This issue has been raised with 14 https://github.com/w3c/accname/issues/27 15 16 Test: accessibility/img-no-alt-not-ignored-with-title.html 17 18 * accessibility/AccessibilityRenderObject.cpp: 19 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const): 20 1 21 2021-10-25 Ayumi Kojima <ayumi_kojima@apple.com> 2 22 -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r284769 r284844 1444 1444 return false; 1445 1445 1446 // webkit.org/b/173870 - If an image has other alternative text, don't ignore it if alt text is empty. 1447 // This means we should process title and aria-label first. 1448 1449 // If an image has the title or label attributes, accessibility should be lenient and allow it to appear in the hierarchy (according to WAI-ARIA). 1450 if (!getAttribute(titleAttr).isEmpty() || !getAttribute(aria_labelAttr).isEmpty()) 1451 return false; 1452 1446 1453 // First check the RenderImage's altText (which can be set through a style sheet, or come from the Element). 1447 1454 // However, if this is not a native image, fallback to the attribute on the Element. … … 1456 1463 return true; 1457 1464 if (altTextInclusion == AccessibilityObjectInclusion::IncludeObject) 1458 return false;1459 1460 // If an image has the title or label attributes, accessibility should be lenient and allow it to appear in the hierarchy (according to WAI-ARIA).1461 if (!getAttribute(titleAttr).isEmpty() || !getAttribute(aria_labelAttr).isEmpty())1462 1465 return false; 1463 1466
Note:
See TracChangeset
for help on using the changeset viewer.