Last active
January 19, 2021 22:06
-
-
Save robby1066/892a84cf342ba83885defb92ea40b7a0 to your computer and use it in GitHub Desktop.
These snippets for VS Code add attributes to HTML tags that are useful for assistive technologies. By including these attributes by default, it becomes easier to get in the habit of using them.
This file contains hidden or 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
{ | |
"Accessible Image Method": { | |
"prefix": "image_*", | |
"body": [ | |
"image_tag('$1', alt: '$2'$3) " | |
], | |
"description": "Accessible Image" | |
}, | |
"Accessible Image Tag": { | |
"prefix": "<img", | |
"body": [ | |
"<img src=\"$1\" alt=\"$2\"" | |
], | |
"description": "Accessible Image" | |
}, | |
"Accessible HTML Tag": { | |
"prefix": "<html", | |
"body": [ | |
"<html lang=\"${1:en-US}\"" | |
], | |
"description": "HTML tag with language attribute" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Docs on how to install snippets in VS Code