Detects missing or empty alt attributes in image tags across HTML, React, Next.js, Vue, Angular, Svelte, and Astro.
<img>
, <Image>
, and <v-img>
tags..html
, .jsx
, .tsx
, .vue
, .svelte
, .astro
.astro-build.astro-vscode
for .astro
files.svelte.svelte-vscode
for .svelte
files.Alt Text Fixer: Scan File
from the Command Palette (Ctrl+Shift+P
).Ctrl+.
to apply fixes.Open your file and run Alt Text Fixer: Scan File
from the Command Palette.
When a missing or empty alt
attribute is detected, a bulb icon will appear in the gutter. Click the bulb or press Ctrl+.
to see available option.
If the scan command fails, add the following to your settings.json
:
"files.associations": {
"*.jsx": "javascriptreact",
"*.astro": "astro",
"*.svelte": "svelte"
}
If you find this extension helpful, please consider giving the repo a β on GitHub. it means a lot!
All contributions are welcome!
Feel free to open issues, suggest features, or submit a pull request. Letβs make web accessibility better together.