Skip to content

Accessibility

Accessibility standards

The accessibility rules every component meets, checked by the build or by review.

Floor
WCAG 2.2 level AA
Small text
7:1 (AAA contrast) under 14px
Themes
Light, dark, forced colors, print

Standards

Standards Stingray is designed against
StandardApplies toStingray
WCAG 2.2 (W3C, 2023)The basis for the others.AA for every component. AAA for small-text contrast (7:1), relaxed targets (44px) and the 2px focus ring (7:1).
Section 508US federal ICT.Covered by WCAG AA.
EN 301 549EU public-sector procurement and the European Accessibility Act.Covered by WCAG AA.
eMAGBrazilian federal e-government.Keyboard, contrast and labeling covered. Language and content are the product team's.

Components conform; products still have to

A product's conformance also depends on its content, composition and testing with assistive technology.

Contrast

Every text, icon and boundary color is tested in both themes on every surface. The build fails if a pair drops below its target.

Contrast targets
TargetApplies toWCAG
7:1Text under 14px. Colored text steps reach 8.5:1 on white.1.4.6 (AAA)
4.5:1Labels on filled buttons and solid fills, in every state.1.4.3 (AA)
3:1Checkbox, radio and switch boundaries, status glyphs, severity bars, chart marks, and filled-button edges against the page. Text fields rest lighter, reaching 3:1 on hover and 7:1 on focus; for a resting 3:1, set --sg-input-border to --sg-color-border-control.1.4.11 (AA)
7:1The focus ring, on every surface.2.4.13 asks 3:1

Check a pair

Test any two colors against the targets. The default is tertiary text on the selected row fill, the tightest text pair.

Keyboard

Everything works from the keyboard, in reading order, with no traps. Composite components are one tab stop with arrow keys inside.

Keyboard patterns by component
ComponentKeys
Button, linkEnter activates. Space also activates a button.
Checkbox, switchSpace toggles.
Radio group, segmented controlTab enters once; arrow keys move and select.
SelectNative: arrow keys, type-ahead, Enter or Space to open.
TabsTab enters once. Left and Right move; Home and End jump; the panel follows.
Data gridArrow keys, Home, End, Page Up, Page Down, Space, Enter. Full model in Table and grid.
Filter/ focuses it from anywhere; Esc clears it.
ComboboxTyping filters. Down opens and moves; Enter picks; Esc closes the list, then clears. Focus stays in the field.
Command paletteCtrl K or Cmd K opens. Typing filters, Up and Down move, Enter runs, Esc closes and returns focus.
TreeOne tab stop. Up and Down move; Right opens or steps in; Left closes or steps out; Home, End and type-ahead jump; Enter selects.
Filter chipsEach remove button is a tab stop. Delete removes the focused chip; focus moves to the next.
AccordionNative: Enter or Space on a summary toggles it.
MenuOpens from its button. Up, Down, Home, End and type-ahead move; Esc closes and returns focus; Tab closes.
DialogTab stays inside; the page behind is inert. Esc closes and returns focus to the trigger.
TooltipShows on focus. Esc dismisses.
ChartFocus the chart; Left and Right move between categories and read every series. Esc hides the readout. "View as table" is a tab stop.
ToastAction and dismiss buttons are tab stops. The timer pauses while focus is inside.

Focus

Focus rules
RuleDetail
The ring2px solid ink outline, 2px offset, no layout shift. 7:1 or better on every surface, both themes. Never blue.
Packed itemsTable cells, menu items, tabs and nav items draw it inset.
Forced colorsThe system Highlight color.
Order and returnTab order follows reading order. Dialogs return focus to their trigger, menus to their button.
Never removedNo outline: none. Sticky headers never hide focus (WCAG 2.4.11).
Skip linkFirst focusable element on every page; visible on focus.

Target size

Target sizes
ContextSize
Minimum anywhere (WCAG 2.5.8, AA)24px
Dense controls and rows28px
Standard controls and rows (default)36px
Relaxed controls, touch (WCAG 2.5.5, AAA)44px
Checkbox, radio and switch rows, label included24px tall

Motion, time and flashing

Zoom, text spacing, forced colors, print

Adaptive behavior
ConditionBehavior
Larger text (WCAG 1.4.4)All sizes, gaps and controls are in rem and scale with the browser text size. Try it on the Spacing page.
Reflow at 400% zoom (1.4.10)Under 640px: one column, and tables scroll in their own region. Nothing else scrolls sideways.
Text spacing overrides (1.4.12)Line heights at least 1.33, body copy 1.5. Containers size to content, so text never clips.
Forced colors (Windows high contrast)Icons take the color of adjacent text; status glyphs, sort icons and separators use CanvasText. The primary button fill and focus ring use Highlight. Selection bars, tab indicators and meters are real elements, not box shadows.
Grayscale and color-blindnessEvery status has a glyph, label and hue. Charts add a legend, direct labels, a table view and a texture fallback.
PrintLight theme, tables expanded, chart textures on, link addresses shown, classification and provenance kept.

Roles, names and announcements

Semantics per component
ComponentSemantics
Button, link, fieldNative elements. A label per input; help and errors via aria-describedby; aria-invalid on error; aria-busy while loading.
IconsDecorative, aria-hidden. Icon-only controls get aria-label and a tooltip.
StatusA text label. The CSS glyph is outside the accessibility tree.
Severityrole="img" with a name such as "Severity: High".
Gridrole="grid" on a real table; aria-sort on headers; aria-selected on rows. Sort and filter results are announced once, politely.
Tabstablist, tab with aria-selected and aria-controls, tabpanel with aria-labelledby.
Dialog and menuNative <dialog> opened modally, named by aria-labelledby. Menus: menu and menuitem, with aria-haspopup and aria-expanded on the button.
Toast and bannersA labelled "Notifications" region. status (polite) by default; alert only for errors and incidents.
Combobox and paletterole="combobox" on the field, listbox and option for results, aria-activedescendant for the active option. Result count announced politely.
Treetree, treeitem with aria-expanded and aria-selected, group for each branch.
Progress and skeletonrole="progressbar" with aria-valuetext in words; no value when indeterminate. Loading tables: aria-busy and one status message.
Meter and timersrole="meter" with minimum, maximum and current value. Countdowns are not live regions; state changes are announced once.
ChartA group named by its title and description, a polite keyboard readout, and a table view with real headers.

Testing

Testing matrix
CheckHowWhen
Token gates: contrast, gray, grid, hover, type, CSS hygiene, iconsnode tools/build.mjsEvery build
Automated page checksaxe-core on every docs page, light and dark.Every change
Keyboard walkMain task of each page without a pointer.Every release
Screen readersNVDA with Firefox, JAWS with Chrome, VoiceOver with Safari.Planned, per component
Zoom and text200% and 400% zoom (320px reflow); WCAG 1.4.12 text spacing.Per component
Forced colors, grayscale, printEmulate each; nothing is lost.Per component

What is automated

The build checks tokens and CSS. The other checks run by hand before a release. axe-core found no violations in light, dark or at phone width. Screen readers are not tested yet.