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

Added screen reader only mixin #31

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

firstchair
Copy link
Contributor

@firstchair firstchair commented Mar 7, 2024

This mixin hides an element to all devices except screen readers.
Naming up for debate, could be @mixin screen-reader-only(); or @mixin visually-hidden();

@ReneDrie
Copy link
Contributor

ReneDrie commented Mar 7, 2024

I think the mixin is good, but I'm wondering wether it should be a mixin. To avoid repetition I'd rather make this a utility class (which can't live in this library atm). So it might make more sense to add a .sr-hidden class on the _base.scss of our projects for instance.

@firstchair
Copy link
Contributor Author

@ReneDrie Indeed, this could be a global class to have less code but this is the same for the image replacement mixin for example. We could also have some default classes that we import.

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.

2 participants