-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Clarify accessibility criteria descriptions #1403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,17 +25,17 @@ Comprehensive accessibility rules for web application development. Every anti-pa | |||||
| | 1.2.1 Audio/Video-only | A | Provide transcript (audio) or text alternative (video). | | ||||||
| | 1.2.2 Captions (Prerecorded) | A | All prerecorded video has synchronized captions. | | ||||||
| | 1.3.1 Info and Relationships | A | Structure (headings, lists, tables, labels, landmarks) programmatically conveyed. | | ||||||
| | 1.3.2 Meaningful Sequence | A | DOM reading order matches visual order. | | ||||||
| | 1.3.2 Meaningful Sequence | A | When the sequence that content is presented affects its meaning, the visual and programmatic ordering of content should align. | | ||||||
| | 1.3.3 Sensory Characteristics | A | Instructions don't rely solely on shape, size, position, or sound. | | ||||||
| | 1.3.4 Orientation | AA | Content not restricted to single orientation unless essential. | | ||||||
| | 1.3.5 Identify Input Purpose | AA | Input fields have `autocomplete` attributes for user data (name, email, tel). | | ||||||
| | 1.3.4 Orientation | AA | Content is not restricted to single orientation unless essential. | | ||||||
| | 1.3.5 Identify Input Purpose | AA | Input fields have `autocomplete` attributes when collecting information about the user. | | ||||||
| | 1.4.1 Use of Color | A | Color is not the only means of conveying info. | | ||||||
| | 1.4.3 Contrast (Minimum) | AA | Text: 4.5:1 normal, 3:1 large (18pt / 14pt bold). | | ||||||
| | 1.4.4 Resize Text | AA | Text resizable to 200% without loss of content. | | ||||||
| | 1.4.10 Reflow | AA | Content reflows at 320px CSS width (no horizontal scroll). | | ||||||
| | 1.4.4 Resize Text | AA | Text resizable to 200% without loss of content or functionality. | | ||||||
| | 1.4.10 Reflow | AA | Sections of content can fit within 320px CSS width viewports without needing to scroll in two-dimensions to read. | | ||||||
| | 1.4.11 Non-text Contrast | AA | UI components and graphics: 3:1 against adjacent colors. | | ||||||
| | 1.4.12 Text Spacing | AA | No loss of content with overridden line-height (1.5x), spacing. | | ||||||
| | 1.4.13 Content on Hover/Focus | AA | Tooltips: dismissible, hoverable, persistent. | | ||||||
| | 1.4.12 Text Spacing | AA | No loss of content or functionality with user-overridden line-height (1.5x), or specified paragraph, letter and word spacing adjustments. | | ||||||
| | 1.4.13 Content on Hover/Focus | AA | Popup content that appears on hover or focus is: dismissible, hoverable, persistent. | | ||||||
|
|
||||||
| ### Operable | ||||||
|
|
||||||
|
|
@@ -52,13 +52,13 @@ Comprehensive accessibility rules for web application development. Every anti-pa | |||||
| | 2.4.4 Link Purpose | A | Link purpose determinable from text or context. | | ||||||
| | 2.4.6 Headings and Labels | AA | Headings and labels describe topic or purpose. | | ||||||
| | 2.4.7 Focus Visible | AA | Keyboard focus indicator is visible. | | ||||||
| | 2.4.11 Focus Not Obscured | AA | Focused element not entirely hidden by sticky headers/footers. *(New in 2.2)* | | ||||||
| | 2.4.11 Focus Not Obscured | AA | Focused element not entirely hidden by other overlaying elements (such as sticky headers or footers). *(New in 2.2)* | | ||||||
| | 2.5.1 Pointer Gestures | A | Multi-point gestures have single-pointer alternative. | | ||||||
| | 2.5.2 Pointer Cancellation | A | Activation on up-event, not down-event. | | ||||||
| | 2.5.3 Label in Name | A | Accessible name contains the visible label text. | | ||||||
| | 2.5.2 Pointer Cancellation | A | Activation on up-event, unless activation can be aborted, reversed or down-event activation is essential. | | ||||||
| | 2.5.3 Label in Name | A | Accessible name contains the label text as it is visually presented. | | ||||||
| | 2.5.4 Motion Actuation | A | Device motion has UI alternative and can be disabled. | | ||||||
| | 2.5.7 Dragging Movements | AA | Drag-and-drop has click/tap alternative. *(New in 2.2)* | | ||||||
| | 2.5.8 Target Size (Minimum) | AA | Touch targets at least 24x24 CSS px. *(New in 2.2)* | | ||||||
| | 2.5.8 Target Size (Minimum) | AA | Interactive controls have a target size, or spacing of at least 24x24 CSS px. *(New in 2.2)* | | ||||||
|
|
||||||
| ### Understandable | ||||||
|
|
||||||
|
|
@@ -102,7 +102,7 @@ Comprehensive accessibility rules for web application development. Every anti-pa | |||||
| ## Five Rules of ARIA | ||||||
|
|
||||||
| 1. **Prefer native HTML** — Use `<button>` not `<div role="button">`. Native elements have built-in keyboard, focus, and semantics. | ||||||
| 2. **Don't change native semantics** — Don't add `role="heading"` to a `<button>`. Use the correct element. | ||||||
| 2. **Don't change native semantics where prohibited** — Don't add `role="heading"` to a `<button>`. Use the correct element. | ||||||
| 3. **All ARIA controls must be keyboard operable** — If `role="button"`, handle Enter and Space key events. | ||||||
| 4. **Don't use `aria-hidden="true"` on focusable elements** — Hidden from assistive tech but still focusable creates a "ghost" element. | ||||||
| 5. **All interactive elements need an accessible name** — Via label, `aria-label`, `aria-labelledby`, or visible text content. | ||||||
|
|
@@ -147,7 +147,7 @@ Maintain logical nesting: `h1 > h2 > h3 > h4`. Style headings with CSS, not by c | |||||
|
|
||||||
| - **Severity**: IMPORTANT | ||||||
| - **Detection**: Pages using only `<div>` without `<nav>`, `<main>`, `<header>`, `<footer>` | ||||||
| - **WCAG**: 1.3.1 (A), 2.4.1 (A) | ||||||
| - **WCAG**: Best practice (supports 1.3.1, 2.4.1) | ||||||
|
|
||||||
| ```html | ||||||
| <!-- GOOD --> | ||||||
|
|
@@ -230,15 +230,15 @@ Remove redundant ARIA. `<button>` already has `role="button"`. | |||||
| - **Detection**: `aria-hidden="true"` on focusable elements (button, input, a, [tabindex]) | ||||||
| - **WCAG**: ARIA Rule 4 | ||||||
|
|
||||||
| Use `inert` attribute or remove from tab order entirely. | ||||||
| Use `disabled` attribute for allowed elements. Use `inert` attribute for obscured/off-screen content if the content is meant to be completely hidden and not functional. | ||||||
|
||||||
| Use `disabled` attribute for allowed elements. Use `inert` attribute for obscured/off-screen content if the content is meant to be completely hidden and not functional. | |
| Do not leave focusable elements inside `aria-hidden="true"` content. For native controls that support it, such as `<button>` or `<input>`, use `disabled` only when disabling the control is the intended behavior. For `<a>` elements or arbitrary elements made focusable with `[tabindex]`, remove focusability instead (for example, remove `href` or `tabindex`). If the content should be completely non-interactive and hidden from assistive technology, use `inert`, `hidden`, or remove it from the DOM. |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase “expected high contrast styling” is ambiguous here (it’s not clear what specific requirement to implement). Consider replacing it with concrete, testable guidance (e.g., ensure visible focus styles and contrast for the custom control meet the relevant WCAG criteria) or remove it to avoid unclear instructions.
| Use `<button>` instead. If div is required: add `role="button"`, `tabIndex={0}`, and handle Enter/Space as well as expected high contrast styling. | |
| Use `<button>` instead. If a `<div>` is required, add `role="button"`, `tabIndex={0}`, handle Enter and Space, provide a visible focus indicator, and ensure the control's focus and interactive states meet applicable WCAG 2.2 AA contrast requirements. |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s trailing whitespace at the end of this line, which can cause noisy diffs and some markdown lint failures. Please remove the extra space at the end of the sentence.
| Store reference to trigger element or to best logical location if triggering element is no longer present upon close. On modal close, call `triggerElement.focus()`. | |
| Store reference to trigger element or to best logical location if triggering element is no longer present upon close. On modal close, call `triggerElement.focus()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Reflow criterion summary, “scroll in two-dimensions” is grammatically incorrect; it should be phrased as “scroll in two dimensions” (or “two-dimensional scrolling”) to avoid a typo in the criteria text.