PolymerElements / iron-a11y-keys

A basic element implementation of iron-a11y-keys-behavior
19 stars 22 forks source link

Improve docs for common use cases #42

Open PJK opened 6 years ago

PJK commented 6 years ago

The docs don't describe how to use different keyboard events, which is necessary for overriding Tab/Shift+Tab navigation, probably one of the most common use cases for iron-a11y-keys.

Description

Tab/Shift+Tab navigation in screenreaders is triggered on keydown (as opposed to the default keypress). Capturing the different types of keyboard events is only documented in the grammar specs. Adding an example of how to specify and use this event could be rather helpful to future users.

Moreover, the docs could clarify that keyboard events that have a modifier key will be triggered even if the component only specifies the main key (e.g. tab will fire on shift+tab).