Skip to content

target: 2.7 throws error on aria-hidden attribute #1526

@haoqunjiang

Description

@haoqunjiang

Reproduction: https://stackblitz.com/edit/vitejs-vite-neriqf?file=src/App.vue
(Run npm run build to see the error)

Source code in App.vue:

  <button>
      <span class="fa fa-tweet" aria-hidden="true"></span>
      <span class="label"> Tweet </span>
    </button>

Error on type-checking:

src/App.vue:20:33 - error TS2322: Type '{ class: string; ariaHidden: string; "aria-hidden": "true"; }' is not assignable to type 'ElementAttrs<HTMLAttributes>'.
  Property 'ariaHidden' does not exist on type 'ElementAttrs<HTMLAttributes>'. Did you mean ''aria-hidden''?

20       <span class="fa fa-tweet" aria-hidden="true"></span>
                                   ~~~~~~~~~~~


Found 1 error in src/App.vue:20

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions