08 / Components
One page each, and the arguments that span them
Forty-two components, each with its own page: the component rendered from the package, then its spec in full. This page is the map, and the few arguments that are about more than one of them.
Three levels, and what each one owes the reader
Height is not decoration here: it says what a reader has to do to get rid of something. The base level is the page. The floating level — Popover, Menu, Tooltip — sits on one shadow and dismisses on a click outside. What separates those three is what each may contain and where the focus indicator has to be drawn.
The overlay level dims the page, traps focus and dismisses on Escape. That combination is the definition: anything that does not need all three belongs on the floating level instead. Dialog is that level, and a sheet is the same component anchored to an edge — for content that is long rather than urgent. AlertDialog goes one further: it announces on open and lands focus on Cancel, because a decision that size should not be one Enter away.
Composite widgets cost one Tab
Most components are a single control. The composite patterns own a region of the keyboard instead — Toolbar, Menubar, Tree, DataGrid, Treegrid, Listbox and Combobox. Their shared rule is that the whole widget costs one Tab and arrow keys move inside it. A row of buttons in a plain div is not a toolbar, however much it looks like one.
The builder surface is composed, not invented
The product’s main screen adds nothing to the system: a sections panel, a canvas and an inspector, built from buttons, fields, choice controls and rows, on the Sidebar layout primitive. The section rows reuse the menu item’s geometry, the inspector is Field and Choice at the small control height, and the canvas blocks are the list row with a border.
The shell is a query container, so the inspector leaves at the shell’s own width rather than the window’s — which is what lets the same builder sit in a full page, a preview pane and a docs example without three sets of rules. If a screen this central needs something new, the something belongs in the system first. That is the test the whole library was built toward.
Where this leaves off
Every component here is built, audited against 448 APG requirements, and covered by the browser suite and 299 assertions ported from W3C’s own tests. Each page below carries the component rendered from the package and its spec in full — the same eleven sections, generated from the same file the package ships.
What no test supplies: nobody has yet listened to any of this with a screen reader. Every spec says so in its own Accessibility section rather than claiming otherwise, and several of the fixes already made are specifically about what gets announced.
Every component, and where to find it
core
data
- ChartValues on one scale: across an ordered base as lines, or by category as stacked bars.
- ChartLegendWhich color is which series.
- DataTableA table whose rows are meant to be compared.
- HeatmapHow an amount varies across a grid, shown as depth of one color.
- MeterA measurement inside a known range — storage used, budget spent, sections completed.
- RowsA list of items where nothing is being compared — settings, recent activity, a file list.
- SparklineThe shape of a series, small enough to sit in a table cell or beside a number.
- StatOne number and the word that says what it counts.
- StatGroupStats that belong together, framed so they read as one strip.
- TallyA row of counts, each one a way in: a number, a picture and a word that open the list the number counts.
disclosure
- AccordionA stack of disclosures at one heading level — sections of a long form, a FAQ, an inspector.
- CollapsibleOne trigger, one region.
- TabsAlternative views of one thing, one visible at a time.
feedback
- AlertA message the reader must see, announced without stealing focus.
- BadgeA word or two that names a state — Live, Draft, Parked — and never acts.
- ProgressHow much of a job is done.
- SignalsA row of small icons, one per source, each marked connected or not. It states a fact about each source and never acts.
- SkeletonThe shape of content that has not arrived.
- SpinnerBusy, with no idea how busy.
- StagesWhere a person or a job stands in a sequence of named stages.
- ToastA confirmation that something happened, shown briefly and then gone.
forms
- ButtonThe system's only action element.
- ButtonGroupActions that belong together, joined so they read as one control.
- CalendarA month of days, navigable in two dimensions — one tab stop for the whole grid.
- CheckboxGroupSeveral checkboxes that answer one question — privacy settings, which sections to publish.
- ChipA small control the reader turns on and off, or takes away — a filter, a selected tag.
- ChoiceOne component for checkbox, radio and switch — pick with kind.
- Comboboxin selectionA text input that names a list — filter a long set, or offer a styleable alternative to <select>.
- CounterA count in a card, nudged with plus and minus — people at a table, servings, copies. The number is the thing on screen; typing it is rare, so there is no input.
- DateFieldA date as text, parsed strictly as YYYY-MM-DD and confirmed back in the reader's own locale.
- DatePickerA date typed, or picked from a month — the text field always, the calendar when it helps.
- FieldWraps any single control with its label and one message.
- FileDropZoneTakes files, by dropping them on it or by choosing them.
- RadioGroupA one-of-many choice where an option is always selected.
- SegmentedControlOne choice from two to four, drawn as a control bar rather than a list.
- SliderA value picked by position rather than typing.
- SpinbuttonA number the reader types or nudges — quantities, dimensions, durations.
navigation
- BreadcrumbThe trail back up a hierarchy.
- LinkA native anchor with the contract applied.
- NavWhere the reader can go: a landmark of links, in a row or a column.
- PaginationA numbered way through a list that arrives in pieces.
overlays
- AlertDialogA modal that interrupts to confirm something consequential — deleting, publishing, discarding.
- DialogA decision that must be made before anything else happens.
- MenuA list of actions attached to a trigger.
- PopoverA transient panel for content that needs a click — the test that separates it from a Tooltip.
- TooltipOne sentence of explanation attached to a control.
page
- AppShellAn app's frame: a bar across the top, an optional side column, and the main area.
- PageShellThe page's regions, and nothing that goes in them.
selection
- ComboboxA text input that names a list — filter a long set, or offer a styleable alternative to <select>.
- ListboxA list the reader picks from, always visible.
structure
- CarouselA rotating set of slides.
- DataGridA table whose cells take focus — arrow keys move in two dimensions and the whole grid costs one tab stop.
- FeedA stream of articles that grows as the reader scrolls.
- MenubarA persistent horizontal bar of menus — the File / Edit / View strip.
- SplitterA draggable divider between two panes — a canvas and its inspector.
- ToolbarA group of controls sharing one tab stop, with arrow keys moving inside it.
- TreeA hierarchy the reader expands and selects from — a file listing, a section outline.
- TreegridA grid whose rows form a hierarchy — a file listing with sizes, a nested budget.
surfaces
- BodyThe content of a panel or a section: one block, or several set one distance apart.
- CardA frame around content it does not own.
- EmptyStateWhat a container says when it holds nothing.
- FooterThe row that closes a panel or a section: a note at the start and the actions at the end.
- HeaderA heading row: an icon, a title, a count and one action.
- ProseA column of rendered writing — markdown, a document, a journal entry — dressed by element, because its author could not write a type role on each one.
- SeparatorA line between things, and a role that says the line means something.