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

Update kbn-accessible-click directive to differentiate between links and buttons. #11810

Closed
cjcenizal opened this issue May 15, 2017 · 1 comment
Assignees
Labels
release_note:enhancement Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.

Comments

@cjcenizal
Copy link
Contributor

Per #11513, only elements which are meant to act as buttons should have the button role and respond to the space bar keypress event. We need to update the kbn-accessible-click directive to allow engineers to specify whether it should behave as a button or not:

  1. If the markup is kbn-accessible-click="button", the element should act as a button.
  2. If the markup is kbn-accessible-click, the element should not act as a button.

We'll have to update each instance in which this directive is used, to specify the correct role.

See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role for more info.

@cjcenizal cjcenizal added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. release_note:enhancement labels May 15, 2017
@cjcenizal cjcenizal self-assigned this May 15, 2017
@cjcenizal
Copy link
Contributor Author

After talking about this with @tsullivan we agreed that it doesn't make sense to use this directive on an element which is acting as a link. In that case, you'd just use an anchor tag with an href. It only makes sense to use this directive on an element which acts as a button or otherwise responds to the SPACE keypress, like checkboxes and radio buttons. See http://webaim.org/techniques/keyboard/ for more info on these types of elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

No branches or pull requests

1 participant