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

sidebar toggle #11

Open
cehfisher opened this issue May 15, 2017 · 1 comment
Open

sidebar toggle #11

cehfisher opened this issue May 15, 2017 · 1 comment

Comments

@cehfisher
Copy link

feature request for a sidebar toggle option to show/hide the SG component list

@cehfisher
Copy link
Author

@bradfrost

Added accessible button toggle element that expands/hides the sidebar with mouse click or keyboard navigation. Just tab to the button and press space bar or enter to toggle.

Added visuallyhidden selector to hide the toggle button name from visual users, but will be read for screen readers (so those users know what they are toggling). This selector can be used for other similar elements or to give more context to links (for example: http://a11y-style-guide.com/style-guide/section-general.html#kssref-general-read-more).

For the actual style of the toggle, I created something simple to go with the rest of your style guide ascetic, but update what you need to. Also, I did some quick tests on Chrome, Safari, and FireFox (latest versions), but might need some deeper cross-browser testing.

See #21 for code. Hope this helps get you started on the sidebar toggle :)

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

No branches or pull requests

1 participant