Accessibility and Inclusive Design Questions
Designing and building for the full range of users and abilities: WCAG conformance levels and what they actually require, semantic markup and ARIA, keyboard and screen-reader support, color contrast and non-color affordances, accessible forms and error states, audio and alternative feedback, accessibility testing and audit, and disability-inclusive research. Covers accessible interaction patterns and treating accessibility as a first-class engineering constraint rather than a retrofit. The scope is accessibility as an engineering and design competency: not workplace diversity, inclusion and belonging, not algorithmic fairness or model bias, and not responsive or multi-platform layout as topics in their own right.
Design micro-interaction patterns (success, error, hover, progress) that are accessible to people with cognitive impairments. Describe timing, affordance clarity, repetition, animation use, progressive disclosure, and testing methods to validate reduced cognitive load without losing useful cues.
Sample Answer
Direct answer. Micro-interactions (success, error, hover, progress) accessible to people with cognitive impairments need to be clear and unambiguous without relying on speed or subtlety to convey meaning: generous timing (not a flash that disappears before it can be processed), affordances that clearly state what happened rather than only implying it visually, minimal unnecessary repetition or decoration, and progressive disclosure that doesn't require holding multiple pieces of state in working memory at once.
Timing. A success or error state should persist long enough to be read and processed, not auto-dismiss after a fixed short duration regardless of the user's reading pace; a reasonable floor is at least 5 seconds for a short message, scaling up by roughly 200ms per additional word for longer text, so the message doesn't outrun a slower reader's actual pace; where a toast-style auto-dismiss pattern is used, pair it with a persistent, revisitable record of the same information (an activity log, a form field's own visible error state) rather than relying on the transient notification as the only record.
Affordance clarity. State the outcome in plain text alongside any icon or color cue ("Saved" with a checkmark, not just a checkmark alone), since a purely iconographic or color-only signal requires the user to correctly infer meaning from a symbol, adding an interpretive step that's harder for some cognitive-accessibility populations, and is also just generally less immediately clear for everyone.
Repetition and consistency. Use the same visual pattern and wording for the same type of event everywhere in the product (all success states look and read the same way), since inconsistent patterns for conceptually identical events force the user to re-learn what each variant means, adding unnecessary cognitive load.
Hover. Hover-revealed content (a tooltip, a secondary menu) that disappears the instant the cursor moves even slightly off the trigger is a specific, well-documented cognitive-load problem: a user who needs more time to read what appeared loses it before finishing, and has to retrigger it, possibly repeatedly. WCAG 1.4.13 (Content on Hover or Focus) covers exactly this: hover-triggered content needs to be dismissable (without moving the pointer, for example via Escape), hoverable (the pointer can move onto the revealed content itself without it disappearing), and persistent (it stays visible until the user dismisses it, moves focus away, or it's no longer relevant), not on a short fixed timer. Also avoid hover as the ONLY way an affordance is communicated (a button whose function is explained solely by a hover tooltip, with no persistent visible label), since that forces the user to discover and correctly interpret a transient cue rather than reading a stated affordance, adding exactly the kind of interpretive step this population is most burdened by.
Progressive disclosure and animation use. A multi-step progress indicator should show the current state plainly ("Step 2 of 4: Payment details") rather than relying on an abstract animated progress bar alone; animation used for these states should be brief and purposeful rather than decorative, since motion that exists purely for visual polish adds processing overhead without adding informational value, and, given vestibular sensitivity, should respect prefers-reduced-motion.
Testing for calibration. Test these specific micro-interaction patterns with cognitive-accessibility-focused usability participants specifically, not folded into a general accessibility test session, since this population's feedback on timing and clarity is easy to under-weight relative to more visually-obvious contrast or keyboard-operability findings.
Trade-offs and pitfalls. A design team often treats micro-interaction polish (subtle, fast, minimal) as inherently good design, but for this population specifically, subtlety and speed are frequently the actual defect, not a stylistic preference to be respected; the tension between "feels sophisticated and fast" and "is genuinely legible and processable" is real and worth naming explicitly rather than assuming they're the same goal.
Explain accessible form control patterns: explicit labels, label positioning, when to use aria-labelledby or aria-describedby, why placeholders are not substitutes for labels, required-field indicators, and how to associate error messages programmatically for screen readers.
Sample Answer
Direct answer. Every form control needs a programmatically associated label, not just a visually adjacent one, using an explicit <label for="id"> (or wrapping the control), because a screen reader announces the control's accessible name from that association, not from proximity on screen. Placeholders are not a substitute for a label because the text disappears once the user starts typing, defeating anyone who needs to glance back at what the field is for.
Label positioning and association.
- Explicit association:
<label for="email">Email</label><input id="email">. This is preferred because it also makes the label clickable, which expands the effective click/tap target for the field. aria-labelledbyis used when the visible label text lives somewhere other than a<label>element, e.g. a table where a column heading serves as the label for several inputs in that column:<input aria-labelledby="col-quantity row-3">.aria-describedbysupplements the accessible name with additional context (helper text, format hints, error messages) without replacing the name; it's read after the name, not instead of it.
Why placeholders fail as labels, verified.
import { JSDOM } from 'jsdom';
const dom = new JSDOM('<input id="email" type="text" placeholder="Email address">');
global.window = dom.window; global.document = dom.window.document;
const { default: axe } = await import('axe-core');
const results = await axe.run(document.documentElement, { runOnly: { type: 'rule', values: ['label'] } });
console.log(results.violations.map(v => v.id)); // []
console.log(results.passes.map(v => v.id)); // ['label']
Running this against a placeholder-only input confirmed something non-obvious: it does NOT trigger axe's "label" violation (violations is empty, passes includes label), because per the accessible-name computation spec, placeholder is a valid fallback naming source when nothing else is present, so the field technically has a name. That is precisely why automated testing alone catches only part of this problem: the real defect is not the absence of a name, it's the absence of a PERSISTENT, sufficiently-contrasted, always-visible one. The moment the user starts typing, that name-source is gone from view even though the accessible name (still read by a screen reader on refocus) remains, which is confusing for a sighted low-vision user relying on the visible text and unaffected for a screen-reader-only user, so the two failure modes are different populations.
Grouped inputs and required-field indication. For related fields (e.g. a billing address's street/city/state), wrap them in <fieldset> with a <legend> naming the group, so a screen reader announces the group context once rather than requiring each field's label to repeat "billing" redundantly. Mark required fields with the native required attribute (which most assistive technology announces as "required" automatically) plus a visible asterisk or "(required)" text, not color alone.
Associating error messages programmatically. Point aria-describedby at the error message's id, and add aria-invalid="true" on the field itself, so a screen reader announces both the field's name and its error state and description together when focus lands on it, e.g. "Email, invalid, required format is name@example.com."
A signup-form example. For a multi-field signup form: name and email get <label> associations plus aria-describedby pointing at format hints ("we'll never share this"); password gets a <fieldset> grouping the field with its visible requirements list; the whole form's submit button stays enabled but triggers field-level aria-invalid and a focus-move to the first invalid field on failed submission, so a screen reader user lands directly on the first problem instead of having to hunt for it.
Trade-offs and pitfalls. A placeholder passing automated checks does not mean it's acceptable practice; treat "axe passed" as necessary, not sufficient, evidence for form-field naming quality.
Outline a comprehensive accessibility testing strategy for a mid-sized SaaS web app integrated into the product lifecycle. Cover automated audits, manual checks, assistive-technology testing, PR gating, QA responsibilities, scheduled audits, and how designers and researchers fit into the loop.
Sample Answer
Direct answer. A comprehensive accessibility testing strategy layers four kinds of checks, each catching a different class of defect: automated scans for structural/markup issues, manual keyboard and visual review for what automation can't see, real assistive-technology testing for actual usability, and periodic full audits to catch drift, integrated into the product lifecycle rather than run only before a big launch.
Layer by layer.
- Automated audits (axe-core, Lighthouse) run per PR, catching structural issues like missing alt text, missing form labels (for truly nameless fields), insufficient markup semantics, and some contrast failures. This is the cheapest layer and should gate merges, but it structurally cannot catch everything.
- Manual checks: a keyboard-only pass (can every interactive element be reached and operated without a mouse?) and a visual review (focus order, visible focus indicators, redundant non-color cues) done by the implementing engineer or designer before requesting review, not deferred entirely to a separate QA phase.
- Assistive-technology testing: a rotating subset of features tested with a real screen reader (NVDA+Chrome or VoiceOver+Safari at minimum) each sprint, prioritized by feature criticality rather than attempting exhaustive AT coverage on every change.
- Participant-based usability testing: periodically (quarterly, or before a major feature ships) include actual assistive-technology users in a moderated usability session, since a developer using a screen reader for the first time tests differently than someone who relies on one daily; this catches real usability friction that a compliance-only pass misses even when every WCAG criterion technically passes.
- Scheduled full audits: a broader sweep on a fixed cadence (quarterly or per major release) using a combination of automated tooling and manual expert review, to catch drift across the whole product that per-PR gating alone won't surface, since PR-level gating only checks what changed, not what's been sitting broken for months.
Where designers and researchers fit. Designers review contrast, focus-indicator specs, and non-color redundancy during design review, before implementation starts, which is far cheaper than catching the same issue post-build; researchers own the recruitment and facilitation of the participant-based sessions and feed findings back into design guidelines, not just into a one-off bug list.
QA responsibilities and PR gating. QA owns the manual keyboard/AT-testing checklist for each feature area and is the enforcement point for the automated gate not being silently overridden; PR gating should fail the build on new violations but allow a documented, time-boxed exception process for pre-existing issues being tracked separately, so the gate doesn't become an all-or-nothing blocker that teams route around.
Trade-offs and pitfalls. Relying on the automated layer alone is the most common real failure mode. Running axe-core directly against small fixtures confirms the gap rather than just asserting it:
const { JSDOM } = require('jsdom');
const axeSource = require('fs').readFileSync(require.resolve('axe-core/axe.min.js'), 'utf8');
function testDiv(html) {
const dom = new JSDOM(`<main>${html}</main>`, { runScripts: 'dangerously' });
dom.window.eval(axeSource);
const node = dom.window.document.querySelector('main').firstElementChild;
dom.window.axe.run(node, {}, (err, results) => {
console.log(html, '=>', results.violations.map(v => v.id));
});
}
testDiv('<div onclick="1">Click me</div>'); // => []
testDiv('<div role="button" onclick="1">Click me</div>'); // => []
A plain clickable <div> with an onclick handler produces no violations, and the same element with role="button" added but no tabindex also produces no violations, so a genuinely unusable-by-keyboard control passes every automated check in CI. Only the manual keyboard-only pass catches that class of defect.
You are designing product pages with three images: 1) a product photo showing features, 2) a decorative background pattern, and 3) an infographic chart displaying monthly sales. For each image, write suitable alt text or explain why an empty alt attribute is appropriate and where a longer description would be required.
Sample Answer
Direct answer. Alt text should describe the function or informational content an image conveys, not its visual appearance for its own sake, and the right choice depends entirely on the image's purpose: informative images need a text equivalent of the information, decorative images need an empty alt="" so screen readers skip them silently, and information-dense images need a short alt plus a separate longer description.
The three images.
- Product photo showing features:
alt="Wireless mouse, top view, showing the two side buttons and scroll wheel". Describe what's relevant to a shopper who can't see the photo, not generic filler like "image of a product." - Decorative background pattern:
alt=""(empty, not omitted). An empty alt attribute tells assistive technology to skip the element entirely; omitting the attribute altogether can cause some screen readers to read the filename instead, which is worse than silence. - Infographic chart of monthly sales: a short alt naming the chart type and topic (
alt="Bar chart of monthly sales, January through June") is not enough on its own; a chart needs a longer description exposed viaaria-describedbypointing at an adjacent text block or data table that states the actual trend and values, since the short alt can't carry the analytical content a sighted user gets by looking at the whole chart.
Trade-offs and pitfalls. A common mistake is writing alt text as "image of..." or "picture of...", which is redundant since screen readers already announce that an image is present; the wasted words push the actually useful content further into the announcement. Another common mistake is treating every image with any visual complexity as automatically needing alt="", when the real test is informational value to the user, not visual complexity: a complex decorative pattern is still alt="", and a simple chart with real data is still informative and needs a real description.
Design a strategy to integrate both automated and manual accessibility checks into a design system's CI pipeline. Cover when to run axe-like unit checks, Storybook accessibility snapshots, visual regression for focus states, lint rules, and manual sign-offs for complex components.
Sample Answer
Direct answer. Integrating accessibility checks into a design system's CI pipeline needs both automated per-component checks that run fast enough for every PR, and visual regression testing specifically for focus states, which catches a class of defect axe-style rule checks structurally cannot: a focus style that's technically present (an outline exists) but visually wrong after a CSS refactor.
When to run axe-like unit checks. Every component's story or unit test runs an axe scan on PR, catching structural issues (missing labels, invalid ARIA, insufficient contrast where computable) at the point where a component change is smallest and cheapest to fix, before it propagates into every product surface consuming that component.
Storybook accessibility snapshots. Each documented component state (default, disabled, error, focused) gets its own Storybook story, and an axe scan runs against every story variant, not just the default state, since accessibility issues specific to a non-default state (an error message not properly associated, a disabled state that's still focusable) are otherwise invisible to a check that only ever exercises the default.
Visual regression for focus states. A screenshot-diff tool (Chromatic, Percy, or a Playwright-based visual diff) captures each interactive component's focused-state appearance and flags any pixel-level change on a design-system PR; this catches the specific failure mode where a CSS refactor accidentally removes or alters a focus ring's color/offset while every axe-based check still passes, since axe checks for the computed style's presence, not whether it matches an intended design.
Lint rules. A static lint rule set (eslint-plugin-jsx-a11y or equivalent) runs at the editor and pre-commit level, before a PR is even opened, catching a class of purely structural mistakes (a missing alt prop, an interactive element with no accessible name, an invalid ARIA role/attribute combination) at the cheapest possible point, earlier and cheaper than the axe-in-CI check that catches the same class of issue on an already-open PR.
What a violation actually looks like when it fires. Concretely: a component shipped with <img src="chart.png" /> (no alt) produces this axe-core violation object: { id: 'image-alt', impact: 'critical', description: 'Ensures <img> elements have alternate text or a role of none or presentation', nodes: [{ html: '<img src="chart.png">', target: ['img'] }] }; the same mistake caught earlier by eslint-plugin-jsx-a11y's alt-text rule at commit time reads error img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text. In CI, the axe scan fails the PR check with that violation object attached to the job log (and, depending on the CI integration, as an inline PR comment on the offending story), so the author sees the specific missing-alt failure rather than a generic "accessibility checks failed" status.
Manual sign-offs for complex components. Some components (a rich data grid, a multi-step wizard, a custom drag-and-drop reorder list) have interaction complexity that automated tools structurally cannot judge, such as whether a keyboard flow actually feels navigable during a real task, not just whether individual attributes are present. Tag these components as requiring an explicit human accessibility reviewer's sign-off before merge, distinct from and in addition to the automated checks, so a component can't ship purely on a green CI run when its interaction model genuinely needs a person to operate it.
Trade-offs and pitfalls. Visual regression testing for every component state produces a meaningful review burden (screenshot diffs need human approval on legitimate visual changes), so it's worth scoping specifically to interactive/focus states and other accessibility-relevant visual properties (contrast-critical text) rather than blanket-applying it to every pixel of every component, which would drown real accessibility-relevant diffs in unrelated noise like anti-aliasing variance.
Unlock Full Question Bank
Get access to all Accessibility and Inclusive Design interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.