Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accessibility attributes to loading spinner #2799

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

davwheat
Copy link
Member

Changes proposed in this pull request:
After doing some research, it looks like we need a few a11y attributes on the loading spinner.

role="status" seems a little weird at first (at least it did to me), but it's important. W3 describe a status message as:

[a] change in content that is not a change of context, and that provides information to the user on the success or results of an action, on the waiting state of an application, on the progress of a process, or on the existence of errors

This role also sets an implicit aria-live="polite", meaning screenreaders will know that the contents of this element may change in the future, and that they should notify the user of this element being added/removed/changed in real-time.

We also add an accessible label to ensure that screen readers understand what the element is.

Screenshot

Confirmed

  • Frontend changes: tested on a local Flarum installation.

@davwheat davwheat added the type/accessibility Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.) label Apr 20, 2021
@davwheat davwheat self-assigned this Apr 20, 2021
@davwheat davwheat merged commit 9716a15 into master Apr 20, 2021
@davwheat davwheat deleted the dw/improve-spinner-a11y branch April 20, 2021 16:25
@davwheat davwheat mentioned this pull request Mar 28, 2022
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/accessibility Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants