Improving accessibility of the ds-loading component #3099
Merged
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.
References
Description
In the ds-loading component I added the attribute aria-live=“polite” to the label and to the div containing the “spinner” conditional. In the div containing the “loading balls” I added the attribute aria-hidden=“true”. Based on my research, the aria-live=“polite” attribute tells screen readers that dynamic content can be updated, but is not urgent. This is useful for status messages or informational updates that don't require immediate interruption. And the aria-hidden=“true” attribute hides non-relevant content from screen readers. Such as spans within the loader that have no useful information.
These changes improve the experience of screen reader users by ensuring that only relevant information is announced and that dynamic updates are communicated appropriately.
Instructions for Reviewers
Go to the ds-loading component, see that in the “label” and in the div with the “spinner” conditional the aria-live=“polite” attribute has been added and in the div with the “loading” class the aria-hidden=“true” attribute has been added.
List of changes in this PR:
Include guidance for how to test or review your PR.
Use a screen reader, click on any link or button intended to load content.