[#1730, #1773, #1820, #1849]Added screen reader alerts for various actions throughout the app.#1873
Conversation
7546241 to
88b3991
Compare
88b3991 to
ccf2fdf
Compare
corinagum
left a comment
There was a problem hiding this comment.
Some questions/suggestions before approval :)
| const alert = document.createElement('span'); | ||
| alert.innerText = msg; | ||
| alert.setAttribute('role', 'alert'); | ||
| alert.setAttribute('style', 'position: absolute; top: -9999px;'); |
There was a problem hiding this comment.
should we also make it a 0x0px <div> so in the unlikely chance it gets on screen, it's still invisible?
There was a problem hiding this comment.
I tried this and you can't hide an element with text content: Example
I could give it an opacity of 0, but some screen readers do not read content with an opacity of 0.
There was a problem hiding this comment.
Oh yeah, I meant should we change it from <span> to <div> so that it is adjustable to 0px by 0px. Fiddler shows that as working with overflow: hidden
https://jsfiddle.net/sxygke3n/1/
There was a problem hiding this comment.
(also good to know about the opacity 0 thing, I didn't know that)
eaa2dc7 to
b95ebc5
Compare
|
Addressed feedback |
corinagum
left a comment
There was a problem hiding this comment.
Up to you on whether you want to implement <span> to <div> with overflow hidden. I still think it's a good idea.
|
@corinagum oh duh, |
b95ebc5 to
58afba4
Compare
#1730, #1773, #1820, #1849
===
ariaAlertService.tsinpackages/app/client<span>withrole="alert"that will be read by any screen reader technologies and then removed after 5 seconds