Loading Overlay currently can have text to support a visual loading indicator, but text is not required. Need to uplift loading-overlay to have proper aria-live, description, etc. for screenreader AT when present on screen, such that all users have awareness/understanding of the loading state.
@neilpfeiffer @mmalaker
What is the behavior that is expected when there are multiple components having the 'Loading Overlay' on a page? For now, I was simply hoping to add aria-live="assertive" here which helps the screen-reader read out "Loading" in the 'Loading Overlay' example.
Should there be custom messages involved to convey that the Loading Overlay is open now and it has disappeared etc?
@neilpfeiffer
I'd like to follow-up on whether there need to be custom messages involved as part of this fix.
Talked about not wanting to announce multiple loading messages if page is loading multiple containers.
Some ideas we talked about were making a loadingMessage prop to populate a visually-hidden content. Default to translated loading string. Need to talk through this some more to firm up a solution.
In order to not announce multiple loading messages, it seems like aria-live="polite" is the better way to go.
Plus, in a Stack Overflow article I was reading on the subject, I saw some concerning information on the assertive attribute:
User agents or assistive technologies MAY choose to clear queued changes when an assertive change occurs.
This tells me that if you've got a warning alert in the queue and an assertive loading overlay hits the browser, the queued warning would likely get wiped out, which would be a safety issue. Polite overlays would go to the bottom of the queue and wouldn't be announced until after any other higher priority items.
Thanks, @jeremyfuksa!
Need to talk through this some more to firm up a solution.
@neilpfeiffer @bjankord Has there been further discussion around adding a loadingMessage prop?
Most helpful comment
In order to not announce multiple loading messages, it seems like
aria-live="polite"is the better way to go.Plus, in a Stack Overflow article I was reading on the subject, I saw some concerning information on the
assertiveattribute:This tells me that if you've got a warning alert in the queue and an assertive loading overlay hits the browser, the queued warning would likely get wiped out, which would be a safety issue. Polite overlays would go to the bottom of the queue and wouldn't be announced until after any other higher priority items.