Skip to content

docs(close-button): prefer visually hidden Close labels - #42831

Closed
mdo wants to merge 1 commit into
v6-devfrom
mdo/a11y-close-button-visually-hidden
Closed

docs(close-button): prefer visually hidden Close labels#42831
mdo wants to merge 1 commit into
v6-devfrom
mdo/a11y-close-button-visually-hidden

Conversation

@mdo

@mdo mdo commented Aug 12, 2026

Copy link
Copy Markdown
Member
  • Replace aria-label="Close" with <span class="visually-hidden">Close</span> on .btn-close in docs, examples, shortcodes, and tests
  • Keeps a usable label when CSS fails to load, and helps browser translation pick up the text
  • Updates close-button docs and the v6 migration notes

Supersedes #41587
Fixes #41580

Empty `.btn-close` controls only expose a name through
`aria-label`, so the control is blank when CSS fails and some
browser translators skip the label.

Replace `aria-label="Close"` with a `.visually-hidden` text node
in docs, examples, shortcodes, and tests so the name stays in
the markup.

Fixes #41580
@mdo
mdo requested a review from a team as a code owner August 12, 2026 05:09
@mdo mdo closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant