Which of the examples below have descriptive accessible names?
The contents can be used to generate the accessible name for the <a>
and <button>
elements:
<a href="#">More</a>
<button>Close</button>
<button>
<img src="down.png" alt="">
</button>
aria-label
The aria-label
attribute can be used to create an accessible name that enhances the accessibility of elements.
<a href="#" aria-label="More about wombats">
More
</a>
<button aria-label="Expand accordion">
<img src="down.png" alt="">
</button>
<label>
<label>Address</label>
<input type="text">
<label>
The contents of the <label>
attribute can be used to generate the accessible name for the <input>
- as long as it is programmatically associated using matching for
and id
attributes
<label for="address">Address</label>
<input id="address" type="text">