Accept button not accessible via keyboard
-
The ‘Accept’ button uses an
a
element withrole=button
. In order for ana
element to be navigable via the keyboard, it needs to have anhref
attribute. There are a few viable strategies to make the current “button” accessible:1) Add an href attribute so that keyboard focus can be passed. You’ll need to be sure to prevent default behavior on that href attribute to avoid unexpected jumps on the page.
2) Change to an actual
<button>
element, which is natively focusable.3) Add a tabindex attribute with the value of
0
so that the element can receive keyboard focus without changing sequence in the tab order.As it currently stands, a user who is dependent on the keyboard to navigate cannot accept cookies on a site using this plug-in.
- The topic ‘Accept button not accessible via keyboard’ is closed to new replies.