-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Clicking space on a checkbox button #4474
Comments
I implemented it for accessibility reasons originally. |
Yes, but I don't think it should trigger the toggling twice, right? |
No, that's a bug then. I just mentioned it for context. |
Wes, I checked and basically the PR you made to add accessibility is not needed. It works without it. I am not completely sure if it works nice with screenreaders and stuff, but a button is always clickable with space. The thing is, I would like to leave the test, but the keypress event won't work. I am not sure if under the hood the space counts as a click instead of keypress. Thoughts? |
Hm, maybe I was mistaken in my attempt to fix it. That sounds good - as long as we have a test around it and this is fixed, I'm all for it. |
Yeah, but test how. I have no idea because I don't know how does this work behind the scenes. Is the space on a button considered a click? If so, how to test that? |
It just needs to behave like a click and toggle the button model |
And it does my friend and it does, but no idea how to test that in a special way. |
The pre-existing test may be fine |
There is code to toggle a checkbutton with space. If you go to the demo and do it, it will toggle twice. I haven't checked it yet so I open this issue to not forget.
The text was updated successfully, but these errors were encountered: