Add aria-live to let screen readers announce notifications #6406
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
This issue fixed no. 158 on the list of the Trello board (Added after the intital Github Issue #5277)
Description
Currently the notifications that appear whenever a content node, templates, document type etc. is saved is not announced by screen readers. which leaves screen reader users clueless that a status message telling us whether the save/publish was a success or not.
Therefore I have added
aria-live="assertive"
andaria-relevant="additions"
, which will make a screen reader prioritize announcing the latest added notification - So if 2 notifications are added quickly after each other it will abort reading the 1st status and start reading the 2 status instead.I believe that some of the texts could be more meaningful not only in a non-visual context but also in a visual context but I think that is subject for another PR 😃
Looking forward to receive any questions or feedback you may have about this PR 👍