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

accessibility, focus event listener #11

Open
vabruzzo opened this issue Mar 19, 2017 · 3 comments
Open

accessibility, focus event listener #11

vabruzzo opened this issue Mar 19, 2017 · 3 comments

Comments

@vabruzzo
Copy link

What do you think about adding focus event listener for non-mouse users? I'm undecided myself if this is a good idea but I was thinking of ways to make this accessible. The problem with a focus listener is that a user tabbing through items on the page would trigger everything as they navigate with the keyboard.

Thoughts? Concerns?

Great idea by the way!

@aweary
Copy link
Owner

aweary commented Mar 19, 2017

I'd love to add support for this! Maybe we could make it opt-in at first?

@vabruzzo
Copy link
Author

Yeah, that was my inclination as well! I'll think about it a bit more and open a PR when I get a chance.

@jlr7245
Copy link

jlr7245 commented Mar 25, 2017

I think is a great idea. One way tabbing could be handled is some kind of timer -- if a user navigating via tab pauses on an element for a given period of time, the element loads.

I foresee a couple of issues with this:

  • Users who visit a site frequently will be able to navigate & choose by muscle memory, negating the delay before choosing the element
  • First-time users will be pausing more frequently
  • Might require testing to get the timer length right
  • How to handle users who navigate by both focus and mouse (I've seen a couple articles about how this should be approached wrt CSS, notably this one, which inspired this polyfill. Parts of that solution seem applicable to this.)

I'm definitely going to think about this more also, but I think that adding a focus listener to this would not only improve its accessibility but also encourage the developers who use this to be more intentional about how they're setting up their tabindex order.

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

3 participants