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

Cannot activate block styles via keyboard #10908

Closed
ocean90 opened this issue Oct 22, 2018 · 3 comments
Closed

Cannot activate block styles via keyboard #10908

ocean90 opened this issue Oct 22, 2018 · 3 comments
Labels
[Feature] Blocks Overall functionality of blocks [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Milestone

Comments

@ocean90
Copy link
Member

ocean90 commented Oct 22, 2018

Describe the bug
After focusing a block style and pressing the Enter key nothing happens.

Expected behavior
Just like selecting another block type via Enter, the new style should get applied when pressing the Enter key.

Additional context
The jsx-a11y/click-events-have-key-events rule has been disabled.

/* eslint-disable jsx-a11y/click-events-have-key-events */

@ocean90 ocean90 added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Blocks Overall functionality of blocks labels Oct 22, 2018
@aduth
Copy link
Member

aduth commented Oct 22, 2018

The rule shouldn't have been disabled and it should have been a button.

cc @youknowriad #7362

@aduth
Copy link
Member

aduth commented Oct 22, 2018

I guess the issue with it being a button proper would be how to allow the preview to be shown within it, since elements not-valid-for-button could be included as descendants.

All the same, if we intend to render it as a non-button button, we'd need to otherwise continue respecting all of the same expected behaviors (easier said than done).

@ocean90
Copy link
Member Author

ocean90 commented Oct 22, 2018

@aduth Right, I tried with a button first but funny enough, I had a custom block with a button so that didn't really work out. Added a possible solution in #10909.

@ocean90 ocean90 added this to the 4.2 milestone Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

No branches or pull requests

2 participants