Duplicate id

a11y/dup-idwarningaccessibilitycorrectness

Why it matters

With the same id twice in one render, labels, aria references and focus land on the first element only.

Fix

Make each id unique, e.g. with useId().

Credit

  • From Deque

    The axe rules duplicate-id and duplicate-id-aria require id values referenced by labels and ARIA to be unique.

References