Created
May 7, 2021 07:44
-
-
Save Lelith/5a68539eedbdb0b43e526181bbf6bc09 to your computer and use it in GitHub Desktop.
accessible elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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