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

feat(core): keyboard accessibility support (on by default) #18

Closed
mrlubos opened this issue Jun 25, 2018 · 7 comments
Closed

feat(core): keyboard accessibility support (on by default) #18

mrlubos opened this issue Jun 25, 2018 · 7 comments

Comments

@mrlubos
Copy link

mrlubos commented Jun 25, 2018

Hello, I think it would be great if this button was accessible using the keyboard. This can be achieved by adding tabindex="0" and role="button" to the wrapper <div> tag that has click listener attached to it.

@prescottprue
Copy link
Owner

Love the idea, thanks for reporting! It would be cool to enable/disable that as well.

Open to a PR if you get a chance, otherwise, I will try to get to it this week.

@prescottprue prescottprue changed the title Make the button accessible by default feat(core): keyboard accessibility support (on by default) Jun 25, 2018
@mrlubos
Copy link
Author

mrlubos commented Jun 25, 2018

@prescottprue Yes definitely, users shouldn’t be able to focus this button if it’s disabled imo. Btw why doesn’t it use as a wrapper?

@prescottprue
Copy link
Owner

Not sure what you mean by "why doesn't it use as a wrapper" - guessing you mean something why not support using it as a Higher Order Component wrapper? If so, the answer is just that I haven't needed it yet, but totally open to the idea.

We could instead do a component prop similar to how material-ui does their button, it may be more clear than an HOC.

@mrlubos
Copy link
Author

mrlubos commented Jun 25, 2018

@prescottprue Aha! Formatting removed a word, it was meant to be “why doesn’t it use <button> as a wrapper,” so children elements would be enclosed inside. Sorry!

@mrlubos
Copy link
Author

mrlubos commented Aug 6, 2018

Hi @prescottprue, did you have time to look into this? Thanks!

prescottprue pushed a commit that referenced this issue Aug 7, 2018
* feat(core): keyboard accessibility support (on by default) - #18
prescottprue added a commit that referenced this issue Aug 7, 2018
* feat(core): keyboard accessibility support (on by default) - #18
* feat(deps): update prettier, istanbul, and mocha
@prescottprue
Copy link
Owner

prescottprue commented Aug 7, 2018

@lmenus totally forgot about this, thanks for the reminder. v0.6.0-alpha was released to the next tag (and branch) with tabIndex set to 0 and role="button".

Let me know if it doesn't work as you expect, and we can change it before it goes out to latest.

Was going to look into a few more changes before releasing v0.6.0 to latest, but it should be pretty soon.

@mrlubos
Copy link
Author

mrlubos commented Aug 11, 2018

Hi @prescottprue, sorry for the late reply. Tested it now and works great, thank you!

@prescottprue prescottprue mentioned this issue Nov 23, 2019
prescottprue added a commit that referenced this issue Nov 23, 2019
* feat(ci): switch to Github Actions in place of TravisCI

Also, changes from v0.6.0 all pre-releases including:

* feat(core): keyboard accessibility support (on by default) - #18
* fix(core): prevent button text from being selected - @RabidFire 
* feat(deps): switch to yarn
* feat(core): update to babel 7 and webpack 4
* chore(deps): switch to nyc over istanbul
* chore(deps): update eslint, eslint-config-standard, prettier, mocha, and other dev dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants