E-mail List Archives
Re: Link vs Button for "Cancel"
From: Beranek, Nicholas
Date: Jan 8, 2018 2:30PM
- Next message: Renato Iwashima: "Re: Link vs Button for "Cancel""
- Previous message: Jonathan Cohn: "Re: Voice over focus v/s Keyboard focus"
- Next message in Thread: Renato Iwashima: "Re: Link vs Button for "Cancel""
- Previous message in Thread: Renato Iwashima: "Re: Link vs Button for "Cancel""
- View all messages in this Thread
Yes, you will need to add keypress event handlers for Enter key and Space bar to activate the element with role="button". Also, if the element is not natively keyboard-focusable, then you'll need to add tabindex="0".
This does beg the question: Why not just use a <button>? If you decide to go the button route for your "Cancel" action, then I suggest an HTML <button>.
Nick Beranek
Capital One
- Next message: Renato Iwashima: "Re: Link vs Button for "Cancel""
- Previous message: Jonathan Cohn: "Re: Voice over focus v/s Keyboard focus"
- Next message in Thread: Renato Iwashima: "Re: Link vs Button for "Cancel""
- Previous message in Thread: Renato Iwashima: "Re: Link vs Button for "Cancel""
- View all messages in this Thread