Yugen UI

Accessibility overview

Yugen UI is built to be accessible by default: ARIA semantics from Radix, full keyboard navigation, visible focus and contrast that meets WCAG 2.1 AA.

Principles

Components handle the mechanics (roles, keys, focus); you handle the content (labels, headings, alt text, page order). An interface is accessible only when both are in place.

Semantics first

The right native element (button, a, input, table) and ARIA roles from Radix. No buttons built from a div.

Keyboard as capable as the mouse

Everything you can do with a mouse also works from the keyboard, following the WAI-ARIA APG interaction patterns.

Visible state

A 2px high-contrast focus ring; text at ≥ 4.5:1, control borders at ≥ 3:1; color is never the only signal.

Announced changes

Errors, notifications and async results are read out through live regions at the right level.

User preferences respected

prefers-reduced-motion turns off looping animations; the light / dark theme follows the OS; layouts reflow when zoomed.

Keyboard

Tab stops once in each group (roving tabindex); arrow keys move inside the group. In RTL, ← / → follow the reading direction.

ComponentKeysBehavior
All controlsTabShift+TabMove to the next / previous control in DOM order.
Button, ToggleButton, LinkEnterSpaceActivate (Link: Enter only). ToggleButton toggles aria-pressed.
Checkbox, SwitchSpaceToggle the state.
RadioGroup, ToggleGroup, Toolbar←→↑↓HomeEndMove within the group (RadioGroup also selects the new item).
Tabs←→HomeEndSwitch tabs and show the matching panel; ↑ / ↓ for vertical tabs.
Menu, ContextMenu, MenubarEnter↓↑→EscOpen, move between items, → opens a submenu, Esc closes and returns focus; type to jump to an item.
DropdownEnterSpace↑↓EscOpen the listbox, select an option, type to jump (typeahead).
Combobox, TagPicker, Command↑↓EnterEscBackspaceType to filter, ↑ / ↓ to highlight, Enter to select; Backspace in an empty input removes the last tag (TagPicker).
Slider←→PageUpPageDownHomeEndDecrease / increase by one step, by a large step, go to min / max.
Dialog, DrawerEscTabFocus stays inside the surface; Esc closes it (except modalType="alert"); focus returns to the trigger after closing.
Popover, HoverCard, TooltipEscClose. Tooltip opens when its trigger gets keyboard focus.
AccordionEnterSpace↑↓HomeEndOpen / close a panel, move between headers.
Tree↑↓→←HomeEnd→ expands a branch / moves to the first child, ← collapses a branch / moves to the parent.
List (navigationMode)↑↓→←Move between items; in composite mode, → / ← move into / out of the interactive content of an item.
ToastF8Jump to the notification region; Tab to the action / close buttons.

Semantics for screen readers

Most of it comes from Radix; Yugen adds default labels in Vietnamese for close buttons, pagination and breadcrumbs.

ComponentRole / attributes
Dialog / DialogSurfacerole="dialog" or alertdialog, aria-modal, name from DialogTitle, description from DialogDescription.
Menumenu, menuitem, menuitemcheckbox, menuitemradio, aria-expanded on the trigger.
Tabstablist, tab (aria-selected, aria-controls), tabpanel.
Checkbox, Switch, Radiocheckbox (aria-checked="mixed" when indeterminate), switch, radiogroup / radio.
Sliderslider with aria-valuenow / min / max; name from label or aria-label.
Dropdown, Comboboxcombobox + listbox / option, aria-expanded, aria-activedescendant. In a Field, the Combobox / TagPicker listbox is named by the label (aria-labelledby).
Breadcrumb, Paginationnav with aria-label, current page aria-current="page".
Tableth scope="col", sortable columns have aria-sort; TableSelectionCell is labelled “Chọn hàng” (Select row).
MessageBarrole="alert" for error / warning, role="status" for info / success.
ToastRadix notification region: error / warning toasts are read immediately (assertive), the rest politely (polite).
Spinner, ProgressBarrole="progressbar"; Spinner defaults to aria-label="Đang tải" (Loading).
Avatar, Personarole="img" with the person's name; the status dot has a label.
Field, Inputlabel for, aria-describedby pointing to the hint / validation message, aria-invalid on error.

Checklist before you ship

Tick items as you check them. The list is only kept while you are on this page.

0 of 10 done

Tools & related pages

  • Automated checks: axe DevTools, Accessibility Insights for Web, Lighthouse (they find about 30–40% of issues; the rest needs manual testing).
  • Screen readers: NVDA (Windows, free), Narrator, VoiceOver (macOS / iOS), TalkBack (Android).
  • Chrome DevTools › Rendering: emulate prefers-reduced-motion, prefers-color-scheme, forced-colors and color vision deficiencies.

Further reading: