empowerai / fs-permit-platform

Module for intake of special use applications for Forest Service Application Permits
Other
3 stars 0 forks source link

Admin: error and info icon is missing an alt text spoken to the screen reader #600

Closed JohnHewittCriterion closed 6 years ago

JohnHewittCriterion commented 6 years ago

Notes

The alert error icon needs an alt text spoken to the screen reader user like

so they hear "Error!" rather than just "Sorry ..."

Use aria-label="Info" for the info icon or something similar as the alt text. Use role=img to make it an image.

Season dates for Mt. Hood National Forest are now Nov 01, 2018 to Dec 25, 2018

image

image

Linkage: CTF-74 WCAG: 1.1.1

Acceptance criteria

  • [ ] error and other images in banners read "success" "alert" etc. before reading dialog (will)

Tasks

  • [ ] add aria-role="dialog" to all usa-alert-XXX (will)
  • [ ] add aria-label="success" or "error" etc. to all usa-alert (will)

Definition of Done

  • [ ] Code unit / e2e tested and comply with QWASP
  • [ ] No new security vulnerabilities
  • [ ] Internal team code review
  • [ ] Documentation / readme.md / CircleCI updated
  • [ ] Docker updated
  • [ ] Compare finished design with mockup
  • [ ] Usability tested
sadlerw commented 6 years ago

update fs web design and if it isn't in the u.s. wds give them a PR

sadlerw commented 6 years ago

@JohnHewittCriterion there seems to be some confusion here as there are no images - they are in the css so it isn't possible to add alt text. However I think changing the role from "alert" on the modal dialogs to "dialog" and adding a aria-label="error" should cause it to read "error". Otherwise I don't see how to make it work since there isn't really anything there to add the role="img" to as you suggest.

JohnHewittCriterion commented 6 years ago

@sadlerw I think that seems reasonable. It will read properly as an "Error" or "Warning" dialog and then read the text. Or add an aria-label to the element holding the image of "error" or "warning" and make sure it's in the div with the role="alert". It should then read the "Error" then the message in the box. I haven't done an exact test like this, but I've done similar and it worked well.

sadlerw commented 6 years ago

yea I like your solution better (in osx anyway) - if you make it a dialog then you have to press ctrl/option/shift/downarrow just to read the dialog text - it doesn't do it automatically.

sadlerw commented 6 years ago
screen shot 2018-03-22 at 2 21 04 pm