Are empty IDs considered duplicate?


If there are multiple elements with empty IDs, are they considered duplicate?


Generally no, we would not consider those as duplicate but it is situational. We do recommend removing empty IDs from a clean code perspective, but it is not something that would necessarily fail a WCAG audit without further investigation.

A failure for duplicate, empty IDs would look something like this (3 checkboxes with empty id attributes):

   <input type="checkbox" id=""> 
   <label for="">Choice 1</label>
   <input type="checkbox" id=""> 
   <label for="">Choice 2</label>
   <input type="checkbox" id="">
   <label for="">Choice 3</label>


Free Tools to Continue Learning

Accessible Web Company Logo

Accessible Web RAMP

Monitor your website and manage your progress towards WCAG conformance.

Accessible Web Company Logo

Accessible Web Academy

Career specific courses to help power up your accessibility knowledge.