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

Improve accessibility #659

Merged
merged 7 commits into from Jan 11, 2018
Merged

Improve accessibility #659

merged 7 commits into from Jan 11, 2018

Conversation

squidfunk
Copy link
Owner

@squidfunk squidfunk commented Jan 11, 2018

This PR fixes some of the issues with TAB navigation, improving accessibility.

The following issues have been addressed:

  • Added focus state for clipboard buttons
  • Fixed Search bar takes tab focus #400: Search bar steals tab focus
  • Fixed search not closing on ENTER when result is selected
  • Fixed search not closing when losing focus due to TAB
  • Fixed collapsed navigation links getting focus
  • Fixed outline being cut off on TAB focus of navigation links
  • Fixed bug with first search result navigation being ignored
  • Removed search result navigation via TAB (use and )
  • Removed outline resets for links
  • Improved general tabbing behavior on desktop

The following issues have been discussed in #400 and have not (yet) been adressed:

  • Missing submit button in the search - this will probably never be implemented, as it really doesn't go well with the way search works - it's a "search-as-you-type" dialogue that submits instantly
  • Three labels for search (two buttons and the modal) are not very accessible, but are necessary, because all opening dialogues and modals are currently implemented with the Checkbox hack. This could in theory be dropped for search, as it doesn't work without JavaScript anyway (and is not shown), but it would deviate from the way the theme handles visibility and state

The following improvements suggested by @makshh in #593 have not (yet) been included:

  • Explicitly set focused element depending on context when search is closed
  • Support for TAB navigation inside drawer on tablet and mobile
  • Support for opening search when focusing on search icon on tablet and mobile
  • Support for opening drawer when focusing on menu icon on tablet and mobile
  • Toggle nested menues in navigation with SPACE (this will be done)
  • Toggle drawer with M and close it with ESC

This should greatly improve accessibility, even though it doesn't solve all problems. However, it's a start and I may continue work on the remaining issues at some point in the future.

@squidfunk squidfunk mentioned this pull request Jan 11, 2018
@squidfunk squidfunk merged commit f99f695 into master Jan 11, 2018
@squidfunk squidfunk deleted the feat/aria-styles branch January 11, 2018 22:20
@max-ci
Copy link

max-ci commented Jan 12, 2018

That's a great start! I don't have too much time now, but when I have I will try to test it and give you my thoughts if you don't mind. Cheers!

Also: https://css-tricks.com/small-tweaks-can-make-huge-impact-websites-accessibility/#article-header-id-1

I think skip to main content feature is important (it's somehow implemented in my PR, you can check how it works on GitHub pressing tab after page load).

@squidfunk
Copy link
Owner Author

Great idea!

I think it's more than time to say thank you @makshh for all the great work you have done on Material, starting with answering issues and questions up to the accessibility improvements you made. Awesome work! Let's keep it up.

@squidfunk
Copy link
Owner Author

Skip to content was implemented in #666

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.

Search bar takes tab focus
2 participants