Skip to content

Instantly share code, notes, and snippets.

@robby1066
Last active January 19, 2021 22:06
Show Gist options
  • Save robby1066/892a84cf342ba83885defb92ea40b7a0 to your computer and use it in GitHub Desktop.
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.
{
"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"
}
}
@robby1066
Copy link
Author

robby1066 commented Dec 28, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment