Skip to content
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

mx_MatrixToolbar_warning should have alt text #9537

Closed
mgifford opened this issue Apr 21, 2019 · 2 comments · Fixed by matrix-org/matrix-react-sdk#3772
Closed

mx_MatrixToolbar_warning should have alt text #9537

mgifford opened this issue Apr 21, 2019 · 2 comments · Fixed by matrix-org/matrix-react-sdk#3772

Comments

@mgifford
Copy link

Description

You can either use alternative text here:
<img class="mx_MatrixToolbar_warning" src="img/warning.05cc423.svg" width="24" height="23">

Or add a title in the SVG here:
https://riot.im/app/img/warning.05cc423.svg

Like described here:
https://www.deque.com/blog/creating-accessible-svgs/

Steps to reproduce

I went here:
https://riot.im/app/#/room/!SOMErandomCODE:matrix.org

Ran the WebAim WAVE toolbar & looked at the source code.

Screen Shot of Webaim Error

@lampholder
Copy link
Member

I've put this as p2 because, if I understand correctly, it's the presence of the warning icon that will be undetectable to users using screen readers - they'll still be able to read the text of the warning. Is that right?

@mgifford
Copy link
Author

I would add alt="alert" to the <img>. That's probably the easiest. You could argue that it is redundant to the existing text in which case you should use alt="" to tell screen readers that it is a decorative image.

https://webaim.org/techniques/alttext/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants