Skip to content

docs(spinners): improve buttons examples accessibility - #38632

Merged
mdo merged 3 commits into
mainfrom
main-fod-spinners-docs
Jun 1, 2023
Merged

mdo merged 3 commits into
mainfrom
main-fod-spinners-docs

Conversation

@ffoodd

@ffoodd ffoodd commented May 22, 2023 •

Copy link
Copy Markdown
Contributor

Description

Moving the status role around to ensure it can be useful.

Motivation & Context

The button examples in spinners documentation are really weird regarding accessibility, since the status role is applied on hidden empty elements.

@patrickhlauke we may have a few sentences to add, for example mentioning how a live region works—mainly that it should already be in the DOM and only feed and shown on-demand? The current statement feels very short:

For accessibility purposes, each loader here includes role="status" and a nested <span class="visually-hidden">Loading...</span>.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

@mdo mdo added docs Documentation site and its content v5 v5, the v5-dev branch labels May 22, 2023
@julien-deramond julien-deramond added the accessibility Keyboard, screen readers, contrast, ARIA label May 22, 2023
@patrickhlauke
patrickhlauke self-requested a review May 22, 2023 18:05
@patrickhlauke

Copy link
Copy Markdown
Member

we may have a few sentences to add, for example mentioning how a live region works—mainly that it should already be in the DOM and only feed and shown on-demand?

It will depend on a few factors, mainly how authors will implement these spinners. It would be nice to have an actual working example of a spinner that appears after a particular action, spins for a while, then disappears again, as that would then provide a good example of how authors should use it in practice (and give us something to test as well)

@mdo
mdo merged commit a4918e3 into main Jun 1, 2023
@mdo
mdo deleted the main-fod-spinners-docs branch June 1, 2023 02:32
romankupchak93 pushed a commit to romankupchak93/bootstrap that referenced this pull request Jan 5, 2024
* docs(spinners): improve buttons examples accessibility

* docs(spinners): missed occurrence of wrong role + aria-hidden

---------

Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Keyboard, screen readers, contrast, ARIA docs Documentation site and its content v5 v5, the v5-dev branch

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants