Skip to content

Valid 'name' attribute of <details> tag is treated as invalid, throwing LWC1057 warning, and being stripped on deployment. #5705

@amercer-fdi

Description

@amercer-fdi

Description

When including a set of <details> tags, the name attribute ties them together so that only one may be open at a time. However, VSCode is throwing an LWC1057 warning, and is stripping the attribute when deploying.

Steps to Reproduce

  1. Create new LWC.
  2. Add a <details> tag with a name attribute.
  3. Deploy
    <details name="test1" open>
        <summary>
            Heading 1
        </summary>
        <p>Content 1</p>
    </details>

Expected Results

No error is throw.

Actual Results

Error is thrown: "LWC1057: name is not valid attribute for details. For more information refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details"
Image

Browsers Affected

N/A

Version

  • LWC: 65

Metadata

Metadata

Assignees

No one assigned

    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