maranran / eslint-plugin-vue-a11y

Static AST checker for accessibility rules on elements in .vue
MIT License
161 stars 21 forks source link

Error when alt is present. #20

Open chris-dvlpr opened 5 years ago

chris-dvlpr commented 5 years ago

Is your feature request related to a problem? Please describe. When I've used :alt="content.imageAltText"

  <img
                        v-if="content.image"
                        :src="imageUrl(content.image, '', 'desktop-image')"
                        :alt="content.imageAltText"
                        :title="content.ImageTitleText"
                        class="img-wrapper__image"
                    >

I seem to get the error error img elements must have an alt prop, either with meaningful text, or an empty string for decorative images vue-a11y/alt-text

I thought this would pass, is there something I'm doing wrong or something I can change to have this pass?

giovannetti-eric commented 3 years ago

Hi, I have the same problem, any solution ? My alt can be empty because it's provided by a content editor and the image can be decorative and in this case the error trigger.