Skip to content

Instantly share code, notes, and snippets.

@Lelith
Created May 7, 2021 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lelith/5a68539eedbdb0b43e526181bbf6bc09 to your computer and use it in GitHub Desktop.
Save Lelith/5a68539eedbdb0b43e526181bbf6bc09 to your computer and use it in GitHub Desktop.
accessible elements
// use button tags for interactive elements with clickHandlers
<button onClick={action('clicked'}>i trigger an immediate action</button>
// use a tags for interactive elements that route a user to another view or web application
<a href=".">i move to anther view</a>
// Native form elements are always better in accessibility, even if they are harder to style
// Make them even more accessible by using proper label tags for selectable
<label for="myChoice">My Coice</label><input type="radio" id="myChoice">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment