🌍 Front-end Web Development · subject
Front-end Web Development Accessibility Syllabus
The Accessibility syllabus for Front-end Web Development in full: 2 chapters and 6 topics, every one listed below, plus 51 Accessibility flashcards with answers.
Accessibility syllabus: all 2 chapters
Expand any chapter to see its topics and sub-topics.
-
ARIA
3 topics- Roles
- Properties
- States
-
Best Practices
3 topics- Keyboard Navigation
- Color Contrast
- Screen Readers
Front-end Web Development Accessibility flashcards — 51 questions with answers
What does ARIA stand for, and what is its purpose?
ARIA stands for Accessible Rich Internet Applications. It is a set of HTML attributes that supplement native semantics to make dynamic, custom web content accessible to assistive technologies like screen readers.
In ARIA, what is the distinction between a role, a property, and a state?
A role defines what an element is (e.g., button, dialog). A property defines a characteristic that is usually static (e.g., aria-label, aria-required). A state defines a condition that can change at runtime in response to user interaction (e.g., aria-checked, aria-expanded).
What is the First Rule of ARIA Use?
If you can use a native HTML element or attribute with the semantics and behavior you require already built in, do so instead of repurposing a generic element and adding an ARIA role. Native elements are preferred over ARIA.
What is an ARIA 'role' and what does it communicate to assistive technology?
A role is an attribute (role="...") that defines the type or purpose of a UI element, telling assistive technology how the element behaves and what to expect (e.g., role="button" announces it as a clickable button).
Name the five categories of ARIA roles.
1) Document structure roles, 2) Widget roles, 3) Landmark roles, 4) Live region roles, and 5) Window roles (abstract roles also exist but are not used by authors).
What are ARIA landmark roles, and give four examples.
Landmark roles identify major page regions so users can navigate between them. Examples: banner, navigation, main, complementary, contentinfo, search, region, form.
Which native HTML5 elements have implicit landmark roles equivalent to ARIA landmarks?
<header> = banner, <nav> = navigation, <main> = main, <aside> = complementary, <footer> = contentinfo, and <form>/<section> map to form/region when labeled.
What ARIA role turns a generic element into something announced as a clickable button, and what else must be added for full equivalence?
role="button". To match a native button you must also add tabindex="0" for focusability and key handlers for Enter and Space to trigger activation.
What are ARIA widget roles? Give examples.
Widget roles define interactive UI controls. Examples: button, checkbox, radio, slider, tab, tabpanel, menu, menuitem, dialog, tooltip, switch, combobox, listbox, option, treeitem.
What is the role 'alert' used for, and how does it differ from role 'status'?
role="alert" is a live region for important, time-sensitive messages; it has implicit aria-live="assertive" and interrupts the screen reader. role="status" is for less urgent updates with implicit aria-live="polite", announced when the user is idle.
What does the presentation/none role do to an element?
role="presentation" (or role="none") removes the element's implicit semantics from the accessibility tree, so assistive technology ignores its role while still exposing its content/children. Useful for layout tables or stripping default semantics.
What is the accessibility tree?
The accessibility tree is a structure the browser derives from the DOM, containing accessible objects with their roles, names, states, and properties. Assistive technologies read this tree rather than the raw DOM.
Define the ARIA property aria-label and when to use it.
aria-label provides an accessible name as a string directly on an element. Use it when there is no visible text label, e.g., an icon-only button: <button aria-label="Close">.
What is the difference between aria-label and aria-labelledby?
aria-label takes a literal string as the accessible name. aria-labelledby references the id(s) of other visible element(s) whose text becomes the accessible name. aria-labelledby takes precedence over aria-label when both are present.
What does aria-describedby do?
aria-describedby references the id(s) of element(s) that provide a longer description or supplementary information about the element, announced after the accessible name (e.g., linking a form field to its help/error text).
What is the accessible name computation precedence (highest to lowest)?
1) aria-labelledby, 2) aria-label, 3) the element's native labeling mechanism (e.g., <label>, alt, or content text), 4) title attribute as a last resort.
What does the property aria-required indicate, and how does it relate to the native required attribute?
aria-required="true" tells assistive technology that user input on a form field is required. With native HTML form controls the required attribute is preferred; aria-required is for custom widgets without native required support.
What does aria-haspopup signal, and what values can it take?
aria-haspopup indicates that an element can trigger a popup. Values: true/menu, listbox, tree, grid, dialog, and false. It tells users a secondary element will appear on activation.
What is the purpose of the aria-controls property?
aria-controls identifies (by id) the element(s) whose contents or presence are controlled by the current element, e.g., a tab pointing to the tabpanel it shows, or a button to the region it expands.
What does aria-checked represent, and what are its possible values?
aria-checked is a state for checkable widgets (checkbox, radio, menuitemcheckbox, switch). Values: true, false, and mixed (for indeterminate/tri-state checkboxes).
Show the other 31 Accessibility flashcards
What does aria-expanded indicate and on which elements is it used?
aria-expanded (true/false) indicates whether a collapsible element controlled by the current element is currently expanded or collapsed. Used on disclosure buttons, accordions, menu buttons, comboboxes, and tree nodes.
What is the difference between aria-hidden="true" and the HTML hidden attribute / display:none?
aria-hidden="true" removes the element and its children from the accessibility tree but keeps it visually rendered and possibly focusable. hidden / display:none removes it from both the visual layout and the accessibility tree.
Why is putting aria-hidden="true" on a focusable element a problem?
It hides the element from screen readers while keeping it in the tab order, creating a 'phantom' focus where keyboard users land on an element that is not announced. Hidden interactive elements should also be removed from the tab order.
What does the aria-disabled state do, and how does it differ from the native disabled attribute?
aria-disabled="true" tells assistive technology the element is perceivable but currently disabled; unlike native disabled, it does NOT prevent focus or block events, so you must handle that behavior yourself.
What does aria-selected represent and where is it used?
aria-selected (true/false) is a state indicating the selected item in a set of related elements such as tabs (role=tab), options in a listbox, gridcells, or rows.
What does aria-pressed indicate, and what widget does it create?
aria-pressed (true/false/mixed) on a button creates a toggle button, indicating whether it is currently pressed/active (e.g., a Bold button in a text editor).
What is the function of aria-live, and what are its main values?
aria-live defines a live region whose dynamic content changes are announced by screen readers. Values: off (no announcement), polite (announce when user is idle), and assertive (announce immediately, interrupting).
What do the aria-atomic and aria-relevant properties control in live regions?
aria-atomic (true/false) controls whether the entire region or only changed nodes are announced. aria-relevant specifies which change types (additions, removals, text, all) trigger announcements.
What does aria-current indicate, and give example values.
aria-current marks the current item within a set. Values: page (current page in nav), step, location, date, time, true, or false. Commonly used for the active link in a navigation menu.
What is the purpose of aria-invalid on form fields?
aria-invalid="true" indicates the value entered into a field has failed validation, signaling an error state to assistive technology. Often paired with aria-describedby pointing to the error message.
What is sequential keyboard navigation, and which key drives it?
Sequential keyboard navigation is moving focus through interactive elements one at a time using the Tab key (Shift+Tab to move backward), following the tab order (DOM order by default).
What are the three meaningful values of tabindex and what does each do?
tabindex="0" adds the element to the natural tab order in DOM position. tabindex="-1" makes the element focusable only programmatically (not via Tab). tabindex="1" (or any positive value) forces a custom tab order and is discouraged.
Why is a positive tabindex value (e.g., tabindex="3") considered an anti-pattern?
Positive values override the natural DOM tab order across the whole page, creating a confusing, hard-to-maintain focus sequence and easily causing keyboard traps. Use 0 and -1 only, and rely on DOM order.
What is a keyboard trap, and why must it be avoided?
A keyboard trap is when focus enters a component and cannot leave using the keyboard alone, stranding keyboard and screen reader users. WCAG 2.1.2 requires that focus can always move away via standard keys.
Which keys are expected to activate buttons versus links?
Buttons are activated by both Enter and Space. Links are activated by Enter only. Custom widgets with role=button must therefore respond to both Enter and Space.
What keyboard pattern is expected within a composite widget like a menu, tablist, or radio group?
The roving tabindex / arrow-key pattern: Tab moves focus into and out of the widget as one stop, while the Arrow keys move focus among the items inside it. Only one item has tabindex="0" at a time.
What is the 'roving tabindex' technique?
A focus-management method where exactly one child of a composite widget has tabindex="0" (the active item) and all others have tabindex="-1". Arrow keys move the 0 value to the newly focused item, keeping the group a single tab stop.
What is a visible focus indicator and which WCAG requirement covers it?
A visible focus indicator is the visual outline/styling showing which element currently has keyboard focus. WCAG 2.4.7 (Focus Visible) requires that keyboard focus be visible; you must not remove outlines without providing an equivalent.
What is a 'skip link' and why is it important?
A skip link is a (often initially hidden) link at the top of a page, like 'Skip to main content', that lets keyboard users bypass repeated blocks such as navigation. It satisfies WCAG 2.4.1 (Bypass Blocks).
In a modal dialog, what two keyboard behaviors are required for accessibility?
1) Focus trapping: Tab/Shift+Tab cycle only within the dialog while it is open. 2) Escape closes the dialog, and focus returns to the element that opened it. Focus should move into the dialog on open.
What is the WCAG formula for contrast ratio between two colors?
$$\text{Contrast Ratio} = \frac{L_1 + 0.05}{L_2 + 0.05}$$ where $L_1$ is the relative luminance of the lighter color and $L_2$ that of the darker color. Ratios range from $1\!:\!1$ to $21\!:\!1$.
What is the formula for relative luminance used in WCAG contrast calculations?
$$L = 0.2126\,R + 0.7152\,G + 0.0722\,B$$ where $R$, $G$, $B$ are the linearized (gamma-corrected) channel values. Green is weighted most heavily because the human eye is most sensitive to it.
What are the WCAG 2.1 AA minimum contrast ratios for normal text and large text?
Normal text requires a contrast ratio of at least $4.5\!:\!1$. Large text (at least 18pt, or 14pt bold) requires at least $3\!:\!1$. This is success criterion 1.4.3.
What are the WCAG AAA contrast requirements for normal and large text?
AAA (1.4.6) requires at least $7\!:\!1$ for normal text and at least $4.5\!:\!1$ for large text.
What minimum contrast does WCAG require for non-text elements like UI components and graphics?
At least $3\!:\!1$ against adjacent colors, per success criterion 1.4.11 (Non-text Contrast). This applies to button borders, form field outlines, focus indicators, and meaningful graphical objects.
Why is using color alone to convey information a WCAG violation, and which criterion addresses it?
Color-blind and low-vision users may not perceive the distinction. WCAG 1.4.1 (Use of Color) requires that color not be the only visual means of conveying information; add text, icons, patterns, or underlines as well.
What is a screen reader, and how does a user typically interact with one?
A screen reader is assistive software that converts on-screen content into synthesized speech or braille. Users navigate via keyboard shortcuts, moving by headings, landmarks, links, form fields, or reading linearly through the accessibility tree.
Name three widely used screen readers and the platforms they run on.
JAWS (Windows, commercial), NVDA (Windows, free/open-source), and VoiceOver (built into macOS and iOS). TalkBack is the built-in screen reader on Android.
Why is correct heading structure (h1–h6) important for screen reader users?
Screen reader users navigate by jumping between headings to scan and understand page structure. Headings must be used semantically and in a logical, non-skipping hierarchy, not chosen for visual size.
What makes good alt text for images, and how should decorative images be handled?
Good alt text concisely conveys the image's meaning or function in context, without 'image of' boilerplate. Decorative images should have an empty alt (alt="") so screen readers skip them; functional images describe the action.
How can content be made visually hidden but still available to screen readers?
Use a CSS 'visually-hidden' / 'sr-only' utility (clip the element to a 1px area, off-screen positioning, no display:none) so it stays in the accessibility tree. Avoid display:none or visibility:hidden, which remove it from screen readers entirely.
Front-end Web Development Accessibility FAQ
What is in the Front-end Web Development Accessibility syllabus?
Front-end Web Development Accessibility is split into 2 chapters: ARIA and Best Practices. Together they contain 6 topics.
How many chapters are in Front-end Web Development Accessibility?
2 chapters, containing 6 topics. The largest chapter is ARIA, with 3 topics.
Are there flashcards for Front-end Web Development Accessibility?
Yes — a 51-card Accessibility deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.