Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

馃崟 Fix tab access in browser - #174

Open
samccone wants to merge 1 commit into
googlearchive:masterfrom
samccone:sjs/fix-tab-index-issue
Open

馃崟 Fix tab access in browser#174
samccone wants to merge 1 commit into
googlearchive:masterfrom
samccone:sjs/fix-tab-index-issue

Conversation

@samccone

Copy link
Copy Markdown
Contributor

sorta Fixes #104

@marcysutton

Copy link
Copy Markdown

This only goes part of the way there, and it could cause problems as-is. If possible, using tabindex="0" will keep the existing tab order in the page鈥搕hat makes the collection of tabbable elements much easier to manage. Secondly, tabindex, on what's essentially a fancy div, isn't very useful by itself if there aren't a few key things:

  • A button role or native button element, assuming the behavior is button-like.
  • Text for a screen reader to know what the button is for. This can be a visually-hidden span or an aria-label, remembering localization requirements (the hardest part IMO).
  • A keydown or keypress event, since click won't fire from the keyboard on a custom element.

I like the way you're thinking though, keep it up! 馃崟

@samccone

Copy link
Copy Markdown
Contributor Author

馃憤 thx for the protips :) will update

@marcysutton

Copy link
Copy Markdown

Here's a handy keyboard event reference, you can use it to determine which event to use for custom/non-semantic elements: http://unobfuscated.blogspot.com/2013/05/event-handlers-and-screen-readers.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants