eslint-plugin-vue-a11y icon indicating copy to clipboard operation
eslint-plugin-vue-a11y copied to clipboard

heading-has-content should not error when v-html is used

Open TheJaredWilcurt opened this issue 5 years ago • 0 comments

error: Headings must have content and the content must be accessible by a screen reader
      (vue-a11y/heading-has-content) at src\components\utilities\BaseTitle.vue:3:5:
  1 | <template>
  2 |   <div data-test="baseTitle">
> 3 |     <h3 v-html="title"></h3>
    |     ^

In this component title is a required prop. So the <h3> will always have content. Currently we have to add a <!-- eslint-disable-next-line vue-a11y/heading-has-content -->.

TheJaredWilcurt avatar Feb 18 '20 19:02 TheJaredWilcurt