[Webkit-unassigned] [Bug 194754] Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 10 10:20:48 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=194754
--- Comment #8 from chris fleizach <cfleizach at apple.com> ---
(In reply to gr3g from comment #7)
> Comment on attachment 371006 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371006&action=review
>
> >> Source/WebCore/accessibility/AccessibilityObject.cpp:2527
> >> + if (alt.isEmpty())
> >
> > in this case the element is ignored completely and shouldn't even be in the hierarchy
> >
> > here's the code that does this
> >
> > bool isRenderImage = is<RenderImage>(renderer());
> > if (isRenderImage)
> > altTextInclusion = objectInclusionFromAltText(downcast<RenderImage>(*m_renderer).altText());
> > else
> > altTextInclusion = objectInclusionFromAltText(getAttribute(altAttr).string());
> >
> > if (altTextInclusion == AccessibilityObjectInclusion::IgnoreObject)
> > return true;
> > if (altTextInclusion == AccessibilityObjectInclusion::IncludeObject)
> > return false;
>
> the accessibility audit isn't using the ignore/include logic you've
> referenced (from `AccessibilityRenderObject::defaultObjectInclusion`) for
> its roles, and instead it uses its own function to determine the role
> (`AccessibilityObject::computedRoleString`).
>
> my change fixes the computed role for these scenarios:
> - `<img alt src="...">` (unassigned alt -> role is presentational)
> - `<img src="...">` (missing alt -> role is image)
That seems like its giving bad info to the developer then, because they may think the element is accessible, when in reality it is hidden from users
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190610/6b14a790/attachment.html>
More information about the webkit-unassigned
mailing list