DetailsHTMLAttributes
should have optional name
property in jsx
#11821
Labels
DetailsHTMLAttributes
should have optional name
property in jsx
#11821
Vue version
latest
Link to minimal reproduction
https://github.com/user-attachments/assets/a274be7b-aeff-42b0-ae9a-03fabf1fbb33
Steps to reproduce
<details>
element and assign a[name]
attribute (e.g.,<details name="example">
).[name]
attribute is flagged as an error by the language server, despite being valid in HTML5.What is expected?
The
[name]
attribute should be recognized as valid for the<details>
element, and no error should be flagged.What is actually happening?
When using the
<details>
element in a Vue component written in TSX, the[name]
attribute is valid according to HTML5 specs. However, due to the defined interface, the language server incorrectly flags this as an error and displays a red underline.in https://github.com/vuejs/core/blob/main/packages/runtime-dom/src/jsx.ts#L407-L410
According to the MDN Web Docs, the
[name]
attribute is explicitly valid for the<details>
element in HTML5. It allows for multiple named disclosure boxes to interact within a form, making this a crucial feature that should not be incorrectly flagged.System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: