Skip to content

duplicate-id

The same id appears two or more times in one document. Invalid HTML; htmx swaps the first match, so the wrong element is replaced. aria-describedby and label/for point at the first one too.

Often rides along with duplicate-field-in-form when a table of rows reuses id="status" on every control.

Browsers are lenient. Reviewers read one row. Tests that check a single row’s markup never see the collision across the table.

Unique ids per control (status-1, status-2, …). Prefer per-row hx-* without an enclosing form — see Per-row controls.

Fixture: TABLE_WRAPPED_IN_FORM in Fixtures.