Problem
core/accessibility.css currently exposes two class names for the identical visually-hidden pattern:
.sr-only,
.visually-hidden,
.sr-only-focusable:not(:focus, :focus-within) { … }
Both selectors share one declaration block and produce exactly the same result. Having two names for one concept:
- Invites questions about which to use (and why)
- Sets a precedent for further aliasing (e.g.
.hidden-accessible, .a11y-hidden, …)
- Bloats the public API surface without adding capability
Options
- Keep
.visually-hidden only — the plain-English, self-documenting choice. Better for a clean, opinionated API.
- Keep
.sr-only only — familiar to devs coming from Bootstrap; lower migration friction.
- Keep both, document the canonical name — explicitly call one the canonical and the other a deprecated alias, with a removal milestone.
Recommendation
Adopt .visually-hidden as the single canonical name. If Bootstrap compatibility matters, document .sr-only as a deprecated alias and remove it in the next major version.
Affected file
core/accessibility.css — lines 129–142
Problem
core/accessibility.csscurrently exposes two class names for the identical visually-hidden pattern:Both selectors share one declaration block and produce exactly the same result. Having two names for one concept:
.hidden-accessible,.a11y-hidden, …)Options
.visually-hiddenonly — the plain-English, self-documenting choice. Better for a clean, opinionated API..sr-onlyonly — familiar to devs coming from Bootstrap; lower migration friction.Recommendation
Adopt
.visually-hiddenas the single canonical name. If Bootstrap compatibility matters, document.sr-onlyas a deprecated alias and remove it in the next major version.Affected file
core/accessibility.css— lines 129–142