liveBook · Manning

Accessibility

As explained in Vanilla Web

The degree to which a product or service can be used by people with varied abilities and disabilities.

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

How Vanilla Web covers it

How deep it goes
Gives implementation rules for semantics, forms, contrast, and focus, but leaves detailed WCAG criteria to the guidelines.
Examples
Uses native buttons, a labeled email field with an associated hint, and custom-component focus questions as concrete cases.
What it assumes
Assumes familiarity with HTML elements and forms while defining accessibility and introducing when native semantics need ARIA.
What you can do after
Practice/perform accessible interface checks using native controls, labeled forms, keyboard testing, contrast checks, and assistive technology.
How it connects
Connects semantic HTML and ARIA with progressive enhancement, keyboard navigation, focus management, and assistive technology.

Also explained in

Compare how 9 books explain accessibility →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vanilla Web. The section links point to the parts of the book it draws on.