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

Accessibility: Interactive elements #11513

Closed
cjcenizal opened this issue Apr 28, 2017 · 1 comment
Closed

Accessibility: Interactive elements #11513

cjcenizal opened this issue Apr 28, 2017 · 1 comment
Labels
bug Fixes for quality problems that affect the customer experience Project:Accessibility Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.

Comments

@cjcenizal
Copy link
Contributor

cjcenizal commented Apr 28, 2017

Problem

Interactive elements must be able to receive focus

E.g., <div>, <p>, or <a> without the href attribute can't receive focus. The best way to resolve this issue is to change the element to something that is natively keyboard accessible (<a href=…>, <input type="button">, or <button>). Ensure links and buttons are used correctly (link should be used when navigating and a button should be used when performing an action on the page).

If this technique is not possible, there is a workaround that provides similar functionality. Do the following:

  • The div (or other element) should be given tabindex="0" so that it can receive keyboard focus.
  • The JavaScript onkeyup event handler should be used to trigger element functionality if the Enter key is pressed while the element is focused. This is necessary because some browsers do not trigger onclick events for such elements when activated via the keyboard.
  • If the item is meant to function as a button, the onkeyup event handler should also detect the Spacebar in addition to the Enter key, and the element should be given role="button". (Note: a true button is preferred).

Audit

Search for <a, <button, and ng-click, and .on('click' to find trouble spots.

@cjcenizal cjcenizal added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. Meta and removed Meta labels Apr 28, 2017
@cjcenizal cjcenizal changed the title Accessibility: Interactive elements Accessibility: interactive elements Apr 28, 2017
@cjcenizal cjcenizal changed the title Accessibility: interactive elements Accessibility: Interactive elements Apr 28, 2017
@tbragin tbragin added the bug Fixes for quality problems that affect the customer experience label Jul 28, 2017
@timroes
Copy link
Contributor

timroes commented Nov 21, 2017

This should be done by now. If there are any places left this isn't done we should open a separate issue for that specific place, UI component, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Project:Accessibility Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins.
Projects
None yet
Development

No branches or pull requests

3 participants