<img src="…"
alt="Smiling Baby">
Informative
<img src="…"
alt="">
Decorative
<img src="…"
alt="To our baby
accessories">
Functional
<img src="…"
aria-label="Smiling Baby">
ARIA
5 Rules of ARIA (according to Notes on Using ARIA in HTML)
<!-- (BAD) -->
<h1 role="button">heading button</h1>
<!-- (GOOD!) -->
<h1><button>heading button</button></h1>
If using role=button the element must be able to receive focus and a user must be able to activate the action associated with the element using both the enter (on WIN OS) or return (MAC OS) and the space key.
<a id="airline-logo" href="…"
class="logo"
aria-label="Airline Name">
</a>
<a id="logo" href="…">
<img src="…" alt="Airline Name">
</a>
<a id="logo" href="…"
aria-labelledby="logo-title">
<svg>
<title id="logo-title">Airline Name</title>
…
</svg>
</a>
<th
tabindex="0"
role="button"
aria-label="Sort column"
>Name</th>
<th>
Name
<button aria-label=
"Sort column">
🔼🔽
</button>
</th>
<span
aria-hidden="true"
role="img"
class="icon">
</span>
*Actually not harmful,
but really, what is the point?!
<body aria-hidden="true">
Eric Eggert, Knowbility & W3C/WAI
@yatil
yatil.net