← HTML Fundamentals
Forms and accessibility · 15 MIN

Accessible structure and ARIA basics

Accessible structure and ARIA basics

Accessible Rich Internet Applications attributes can expose names, states and relationships for custom widgets. Native HTML usually provides better built-in behavior. ARIA does not add keyboard interaction automatically; custom controls must implement it themselves.

Try it yourself

Change the example, run it, and explain the result in your own words. Then create one variation of your own.

Key idea

Use the example as a starting point, not something to memorize. Practise, inspect the result and make small improvements.

Code example

<button aria-expanded="false" aria-controls="details">Show details</button>
<div id="details" hidden>More information</div>