HTML buttons should go :active on keydown (spacebar)
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
People
(Reporter: bugzilla, Unassigned)
References
Details
(Keywords: access)
Attachments
(1 file)
(deleted),
text/html
|
Details |
Comment 5•21 years ago
|
||
Comment 7•20 years ago
|
||
Comment 8•20 years ago
|
||
Comment 9•20 years ago
|
||
Updated•15 years ago
|
Comment 13•11 years ago
|
||
Comment 14•11 years ago
|
||
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Comment 20•7 years ago
|
||
Comment 21•7 years ago
|
||
Comment 24•4 years ago
|
||
Please fix this bug! this is an accessibility issue, as it means that people navigating via keyboard cannot get visual feedback on button use!
Comment 25•3 years ago
|
||
After 21 years, this bug is still valid.
People who use the keyboard to navigate, don't get visual feedback when activating a button. This does work in all other modern browsers. Please fix this.
Updated•2 years ago
|
Comment 26•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 7 duplicates.
:emilio, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Comment 27•2 years ago
|
||
I took a look at this in bug 1481400. The behavior of other browsers when you preventDefault
the event or what not is very whacky.
Comment 28•2 years ago
|
||
What's this about? If you request information without a question or so it's hard to know what to answer :)
Comment 29•2 years ago
|
||
After those years this issue maybe deserves some test case being directly attached. Test results from my machine:
Firefox 107.0b9
Outcome label | Active state matched | Focus state matched | Counter increased |
---|---|---|---|
Pressed Space Bar | No * |
Yes | No |
After pressed Space Bar | No | Yes | Yes |
Pressed Enter | No ** |
Yes | Yes, repeatedly |
After pressed Enter | No | Yes | (No) |
Google Chrome 106.0.5249.103
Outcome label | Active state matched | Focus state matched | Counter increased |
---|---|---|---|
Pressed Space Bar | Yes | Yes | No |
After pressed Space Bar | No | Yes | Yes |
Pressed Enter | No ** |
Yes | Yes, repeatedly |
After pressed Enter | No | Yes | (No) |
*
That's what this issue is about.
**
Interesting question whether this is right, but at least both implementations match.
There are many discrepancies in those implementations not covered in test case, for example Chrome gives active state to button while pressed by middle and right mouse buttons (but does not produce activation event) and when activated through corresponding <code>label</code> (in the first step's text), but only on the first click.
If anyone wanted to test other browser and share results, template:
## Browser
| Outcome label | Active state matched | Focus state matched | Counter increased |
| - | - | - | - |
| Pressed Space Bar | . | . | . |
| After pressed Space Bar | . | . | . |
| Pressed Enter | . | . | . |
| After pressed Enter | . | . | . |
I think that bug 1481400 is in fact not related to this one at all; I remember YouTube used to have two event listeners that were fired simultaneously when the play button was "keyboard-clicked" and really forgot to stop event propagation from the "keyboard space bar 'click'" to body space bar keypress listener.
This particular issue is about interactive state interpretation in CSS, not preventDefault
ing in JavaScript. (But as always, I might be wrong.)
Description
•