aria-labelWhich of the examples below correctly use aria-label?
Accessible name for the <button> should be: Close dialog
<button aria-label="Close dialog">✕</button>
Accessible name for the <nav> should be: Primary navigation
<nav aria-label="Primary navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
Accessible name for the <input> should be: Search this site
<input type="search" aria-label="Search this site">
aria-labelAccessible name for the <button> should be: Submit
. The empty aria-label will be ignored.
<button aria-label="">Submit</button>
aria-labelAccessible name for the <button> should be: Submit
. The aria-label containing only whitespace will be ignored.
<button aria-label=" ">Submit</button>
<p>This paragraph has an aria-label.
There will be no accessible name for the <p> as this role does not allow naming.
<p aria-label="Important notice">This paragraph has an aria-label.</p>
<span>There will be no accessible name for the <span> as this role does not allow naming.
<span aria-label="Hello world">This span has an aria-label.</span>
role="none"There will be no accessible name for the <div> as this role does not allow naming.
<div role="none" aria-label="Hello world">This element
has a role of none.</div>