Accessibility means making a website or application usable across different abilities and contexts. It is a product requirement, not just a compliance task: people may navigate by keyboard, use a screen reader, zoom the page, disable images, or encounter a temporary or situational limitation. An interface that works only on pointer hover excludes some of them. section 3.5
Start with the right HTML element. A native <button> supplies semantics, keyboard interaction, and focus behavior that a clickable <div> does not. Semantic elements such as <nav>, <label>, and <form> give browsers and assistive technologies meaningful structure. Add JavaScript interaction progressively; use ARIA to express roles, states, or properties only when native HTML cannot do the job. section 2.3.2 section 3.5.7
Check the interaction, not just the markup:
- Associate every form input with a visible label. Do not substitute placeholder text for a label; make errors clear and associate supporting messages with the relevant input. section 3.5.2
- Make controls usable by keyboard as well as pointer. For a custom component, decide where focus enters, how it moves and leaves, and whether it returns when the component closes. section 3.5.7 section 9.4
- Check text contrast: WCAG 2.1 AA specifies 4.5:1 for standard text and 3:1 for large text. Never make color the only carrier of meaning. section 3.5.6
<form> <label for="email">Email address</label> <input type="email" id="email" required aria-describedby="hint"> <small id="hint">We'll never share your email.</small> </form>
This form pairs an email input with a <label> through matching for and id values, then links a hint through aria-describedby. section 3.5.2
Test with keyboard navigation and assistive technology, and inspect contrast with browser DevTools or WAVE. Native controls reduce the work; custom controls require deliberate focus handling, ARIA, and testing rather than accessibility being bolted on afterward. section 3.5.6 section 3.5.7








