APG Patterns
ๆ—ฅๆœฌ่ชž
ๆ—ฅๆœฌ่ชž

APG Patterns Examples

Accessible UI components and tests implementing WAI-ARIA APG patterns across React, Vue, Svelte, and Astroโ€”concise examples and verifiable tests to help build accessible interfaces. Styling includes dark mode, high-contrast, and forced-colors support.โœจ

Read the Guide โ†’

Available Patterns

๐Ÿช—

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

โš ๏ธ

Alert

An element that displays a brief, important message in a way that attracts the user's attention without interrupting the user's task.

๐Ÿšจ

Alert Dialog

A modal dialog that interrupts the user's workflow to communicate an important message and acquire a response.

๐Ÿ”—

Breadcrumb

A list of links to the parent pages of the current page in hierarchical order.

๐Ÿ”˜

Button

An element with role="button" that enables users to trigger an action. Demonstrates why native <button> is recommended.

๐Ÿ”€

Toggle Button

A two-state button that can be either pressed or not pressed, using aria-pressed to communicate state.

๐ŸŽ 

Carousel

Presents a set of items, referred to as slides, by sequentially displaying a subset of one or more slides.

โ˜‘๏ธ

Checkbox

Supports dual-state (checked/unchecked) and tri-state (checked/unchecked/partially checked) checkboxes.

๐Ÿ”ฝ

Combobox

An input widget with an associated popup that enables users to select a value from a collection.

๐Ÿ’ฌ

Dialog (Modal)

A window overlaid on the primary window, rendering the content underneath inert.

โ–ผ

Disclosure

A button that controls the visibility of a section of content.

๐Ÿ“ฐ

Feed

A section of a page that automatically loads new sections of content as the user scrolls.

๐Ÿ“Š

Grid

A container that enables users to navigate the information or interactive elements using directional navigation keys.

๐Ÿ—บ๏ธ

Landmarks

A set of eight roles that identify the major sections of a page.

โ†—๏ธ

Link

A widget that provides an interactive reference to a resource.

๐Ÿ“

Listbox

A widget that allows the user to select one or more items from a list of choices.

๐Ÿ–ฅ๏ธ

Menubar

A horizontal menu bar with dropdown menus, submenus, checkbox items, and radio groups for application-style navigation.

โ˜ฐ

Menu Button

A button that opens a menu of actions or options.

๐Ÿ“ถ

Meter

A graphical display of a numeric value that varies within a defined range.

๐Ÿ”˜

Radio Group

A set of checkable buttons, known as radio buttons, where only one can be checked at a time.

๐ŸŽš๏ธ

Slider

An input where the user selects a value from within a given range.

โ†”๏ธ

Slider (Multi-Thumb)

A slider with two thumbs that allows users to select a range of values within a given range.

๐Ÿ”ข

Spinbutton

An input widget for selecting from a range of discrete values, typically with increment/decrement buttons.

๐ŸŒ“

Switch

A type of checkbox that represents on/off values, as opposed to checked/unchecked.

๐Ÿงฎ

Table

A static tabular structure containing one or more rows that each contain one or more cells.

๐Ÿ—‚๏ธ

Tabs

A set of layered sections of content, known as tab panels, that display one panel at a time.

๐Ÿ”ง

Toolbar

A container for grouping a set of controls, such as buttons, toggle buttons, or checkboxes.

๐Ÿ’ก

Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

๐ŸŒฒ

Tree View

A widget that presents a hierarchical list with nested groups that can be collapsed and expanded.

๐Ÿ“Š

Treegrid

A widget that presents a hierarchical data grid consisting of tabular information that is editable or interactive.

๐Ÿ“‹

Data Grid

An advanced grid for displaying and manipulating tabular data with sorting, filtering, and row selection.

โ†”๏ธ

Window Splitter

A moveable separator between two sections, or panes, that enables users to change the relative size of the panes.