Skip to content

html-no-duplicate-ids false positives #1728

@SleeplessByte

Description

@SleeplessByte

There are two false positives that are hard to work around

  1. ids set inside <template>. These are not competing with ids outside the template, but currently herb groups them together. Yes, inflating a template and then adding it can cause issues if the IDs collide but consider the use-case where you conditionally render an element with a specific ID on load, and have a button to remove the element from the page. Another button re-adds the element, using the template. Turning off this rule is not a great workaround. IMO template sub-trees should not be considered as they are effectively their own document fragments.
  2. templated ID strings such as "my-thing-:templated-value" inside a template which is changed on inflate. Again, this is because templates can be used as... templates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions