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

Why doesn't use .sr-only in spinner? #27727

Closed
ysds opened this issue Nov 26, 2018 · 5 comments
Closed

Why doesn't use .sr-only in spinner? #27727

ysds opened this issue Nov 26, 2018 · 5 comments

Comments

@ysds
Copy link
Member

ysds commented Nov 26, 2018

https://twbs-bootstrap4.netlify.com/docs/4.1/components/spinners/#about

For accessibility purposes, ...., using a text hiding technique to prevent it from rendering on screen.

Text hide technique is not a modern approach (#24890). IMO we should use .sr-only to hide Loading... text:

<div class="spinner-border" role="status"><span class="sr-only">Loading...</span></div>
@ysds ysds changed the title Why doesn't use .sr-only to spinner? Why doesn't use .sr-only in spinner? Nov 26, 2018
@patrickhlauke
Copy link
Member

don't think there's any particular disadvantage to how it's done now. my comment about modern/not modern was to do with text-hide as a class/old-school image replacement techniques

@ysds
Copy link
Member Author

ysds commented Nov 26, 2018

@patrickhlauke Thanks for your reply. Current the text-indent: -999em; technique is a outdated technique, the html5-boilerplate technique is better. But that is the same with the deprecated text-hide() mixin. If deprecate the text-hide() minix, we should use .sr-only for consistency.

@mdo
Copy link
Member

mdo commented Nov 26, 2018

@ysds Honestly did it the way it’s currently implemented because it’s engrained in my head to do it that way hah. We can definitely use .sr-only.

@XhmikosR
Copy link
Member

Can someone make a PR?

@ysds
Copy link
Member Author

ysds commented Nov 28, 2018

Leave it to me 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants