mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
Replace tag with attribute for alt
Being an attribute, alt should be mentioned as such.
This commit is contained in:
parent
ec74b21c37
commit
5e8383cf37
@ -16,7 +16,7 @@ That's better. But Svelte is giving us a warning:
|
||||
|
||||
When building web apps, it's important to make sure that they're *accessible* to the broadest possible userbase, including people with (for example) impaired vision or motion, or people without powerful hardware or good internet connections. Accessibility (shortened to a11y) isn't always easy to get right, but Svelte will help by warning you if you write inaccessible markup.
|
||||
|
||||
In this case, we're missing the `alt` tag that describes the image for people using screenreaders, or people with slow or flaky internet connections that can't download the image. Let's add one:
|
||||
In this case, we're missing the `alt` attribute that describes the image for people using screenreaders, or people with slow or flaky internet connections that can't download the image. Let's add one:
|
||||
|
||||
```html
|
||||
<img src={src} alt="A man dancing">
|
||||
|
Loading…
Reference in New Issue
Block a user