Skip to content
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

aria attributes no longer recognized #1383

Closed
henribru opened this issue Jun 3, 2022 · 5 comments
Closed

aria attributes no longer recognized #1383

henribru opened this issue Jun 3, 2022 · 5 comments
Labels
question Further information is requested

Comments

@henribru
Copy link

henribru commented Jun 3, 2022

https://github.com/henribru/volar-html-attribute-bug

<button @click="count++" aria-label="foo">count is: {{ count }}</button>

Type '{ ariaLabel: string; "aria-label": string; }' is not assignable to type 'ElementAttrs'.
Property 'ariaLabel' does not exist on type 'ElementAttrs'. Did you mean ''aria-label''?

@hongquan
Copy link

hongquan commented Jun 3, 2022

Appear in volar v0.36.

@adenvt
Copy link

adenvt commented Jun 3, 2022

I got something weird, aria-label work perfectly. But attribute data-testid have an error.

It happen in 0.36.0.

image

@cawa-93
Copy link

cawa-93 commented Jun 3, 2022

Additionals: loading attr in images and iframes

TS2322: Type '{ src: string; alt: string; loading: string; }' is not assignable to type 'ElementAttrs<ImgHTMLAttributes>'.       
  Property 'loading' does not exist on type 'ElementAttrs<ImgHTMLAttributes>'.

20     <img v-if="layoutProperties.src" :src="layoutProperties.src" :alt="layoutProperties.url" loading="eager" >
                                                                                                ~~~~~~~

fill-rule in <path>

Type '{ fillRule: string; "fill-rule": "evenodd"; d: string; }' is not assignable to type 'ElementAttrs<SVGAttributes>'.
  Property 'fillRule' does not exist on type 'ElementAttrs<SVGAttributes>'. Did you mean ''fill-rule''?

29             <path fill-rule="evenodd" d=""/>
                     ~~~~~~~~~

Attributes in custom inputs

 TS2322: Type '{ required: boolean; placeholder: string; }' is not assignable to type 'IntrinsicAttributes & Partial<{ i
d: string; }> & Omit<Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, { ...; }>>> & { ...; } & VNodeProps & AllowedComponentProps & ComponentCustomP
rops, "id">'.
  Property 'required' does not exist on type 'IntrinsicAttributes & Partial<{ id: string; }> & Omit<Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>,
 { ...; }>>> & { ...; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "id">'.

25   <bs-textarea required placeholder="asd"/>
                  ~~~~~~~~
 TS2322: Type '{ placeholder: string; }' is not assignable to type 'IntrinsicAttributes & Partial<{ id: string; }> & Omi
t<Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, { ...; }>>> & { ...; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "id">'.      
  Property 'placeholder' does not exist on type 'IntrinsicAttributes & Partial<{ id: string; }> & Omit<Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Prop
s>, { ...; }>>> & { ...; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "id">'.

26   <bs-textarea placeholder="asd"/>
                  ~~~~~~~~~~~
TS2322: Type '{ disabled: boolean; }' is not assignable to type 'IntrinsicAttributes & Partial<{ id: string; }> & Omit<
Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, { ...; }>>> & { ...; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "id">'.        
  Property 'disabled' does not exist on type 'IntrinsicAttributes & Partial<{ id: string; }> & Omit<Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>,
 { ...; }>>> & { ...; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "id">'.

27   <bs-textarea :disabled="true" />
                   ~~~~~~~~

@kk256vv
Copy link

kk256vv commented Jun 3, 2022

adding some more (v0.36.0)

svg path attributes fill-rule, stop-color
image

svg use xlink:href ( its deprecated but still needed for ios < 12 )
image

found solution thanks
#1077

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Jun 3, 2022

See #1077 (comment), #1077 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants