-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No-text-as-attribute requires translation for empty text #12
Comments
Accessibility is a thing 😊. My opinion is that it should never be empty. 😁😁😁 |
Can't agree more with @mfrachet |
From https://webaim.org/techniques/alttext/#example1 (look at example 2) -- WebAIM (Web Accessibility In Mind) has provided comprehensive web accessibility solutions since 1999. There are use cases where alt can be empty and still be perfectly accessible. The plugin doesn't allow to do that |
Totally agree with this. There are plenty of sites contradicting each other on that topic. I only provide you my thoughts and it s up to you to decide : for me it can exist empty alts for only visual elements like something that exist only for animation purpose and that has no meaning at all. But you may probably talk about your actual need with @Slashgear and share together |
I think you're wrong.
Maybe you prefer to describe all images but when image have nothing to tell, there's no reason to waste time of people who need screen reader. I don't know if you already try to navigate with screen reader but if no, do it once. You'll see how it's long and boring. With small efforts of devs (like providing smart alt only when it's useful), we can make their navigation easier, so why not helping them ? |
I already did the fix on a fork (1 line change), I can submit a PR if you agree with |
If I write
<img src="icon.png" />
I getimg elements must have an alt prop, either with meaningful text, or an empty string for decorative images.eslint (jsx-a11y/alt-text)
But If I change it to
<img alt="" src="icon.png" />
I getUntranslated JSX attribute alt with "" eslint(m6web-i18n/no-text-as-attribute)
Maybe no-text-as-attribute should accept empty values, or a list of whitelisted values ?
The text was updated successfully, but these errors were encountered: