maranran / eslint-plugin-vue-a11y

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

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

Open TheJaredWilcurt opened 4 years ago

TheJaredWilcurt commented 4 years ago
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 -->.