Empty id
and name
attributes tests
To determine if id
and name
attributes are considered invalid if written as boolean attributes, or attributes with blank values.
Example 01: id
and name
attributes without values
Code
<button id name aria-label="">Test one</button>
Example 02: empty id
and name
attributes
Code
<button id="" name="" aria-label="">Test two</button>
Results
Both methods are considered invalid.
- An
ID
must not be the empty string. - The
name
value must not be empty. ID
attributes with empty strings are also not considered unique.