-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Icon alt-text support #54
Comments
blackfalcon
added a commit
that referenced
this issue
Dec 21, 2022
Changes to be committed: modified: demo/demo.md modified: src/auro-icon.js modified: src/style.scss
blackfalcon
added a commit
that referenced
this issue
Dec 21, 2022
Changes to be committed: modified: test/auro-icon.test.js
6 tasks
jason-capsule42
pushed a commit
that referenced
this issue
Dec 28, 2022
Changes to be committed: modified: demo/demo.md modified: src/auro-icon.js modified: src/style.scss
jason-capsule42
pushed a commit
that referenced
this issue
Dec 28, 2022
Changes to be committed: modified: test/auro-icon.test.js
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Please see the following issue
Describe the solution you'd like
Given that there are some opportunities for icons to be read aloud to screen readers, e.g. the icons that appear in auro-hyperlink,
aria-hidden
is on the SVG itself, not on the auro-icon element. This will be addressed with the following issue.It is incorrect to say that ALL images should have descriptive text. https://www2.gov.bc.ca/gov/content/home/accessible-government/toolkit/accessible-digital-content/graphics#decorative
It is also considered a failure to not marking up decorative images in HTML in a way that allows assistive technology to ignore them
Content producers and users of auro-icon should be educated to follow this W3C alt Decision Tree.
That being said, it's not Auro's call to enforce an opinion on that on whether that is read by screen readers or not. It is however our position to ensure that the end users do have a proper and informative experience.
For the auro-icon element, we cannot use
alt=""
, as that is only allowed on images themselves, but we can use thetitle
attribute.On the
div
with theclass="primary"
we can add by default,aria-hidden="true"
. On the element itself, we would support the two new attributes,If
aria-hidden="false"
is used, this will remove thearia-hidden="true"
on the innerdiv
in the shadow DOM and allow for thetitle
of the SVG to be read aloud.If the
title
attribute is used, this will be picked up by the screen readers and the innerdiv
will remain witharia-hidden="true"
.Legacy support
The auro-icon element already has support for
alt
text. A user could add content in theslot
of the element and this would be read aloud by screen readers.While this works, it is a non-standard approach to a11y and SVGs. It is the recommendation that we do not remove this support, but we only deprecate it and remove the examples from the docs.
Exit criteria
This issue will be considered closed when,
aria-hidden="false"
and the contents of the SVG'stitle
element is read aloudtitle
attribute and this will have precedence to be read aloud over the SVG'stitle
element.title
element is still visible on tool-tipThe text was updated successfully, but these errors were encountered: