Examples
aria-current
Marks the current item in a set: the page in navigation, the step in a process, today in a calendar. Use the most specific value. VB styles it on navigation links, so the current item is highlighted and announced from one attribute.
1234567891011121314
<nav class="breadcrumb" aria-label="Breadcrumb"> <ol> <li><a href="/">Home</a></li> <li><span aria-current="page">Settings</span></li> </ol></nav> <nav class="steps" aria-label="Checkout progress"> <ol> <li>Basket</li> <li aria-current="step">Delivery</li> <li>Payment</li> </ol></nav>
Styled in VB: nav a[aria-current="page"] and nav [aria-current="page"] > a (fill, colour and a locked underline as the non-colour cue), plus the .tabs, .breadcrumb, .pagination, .tree and .steps (aria-current="step") variants (src/native-elements/nav/styles.css); data-paged page buttons (src/utils/data-paged.css); <page-toc> (aria-current="true"), <bread-crumb>, <nav-bar>, <date-picker>, <week-view> and <data-table> (their styles.css).
Set for you by: <nav-bar> (the link matching the URL), <bread-crumb> (the last crumb), <page-toc> (the section in view), data-paged controls (src/lib/data-paged-controls.js), the form wizard step list (src/lib/wizard.js), <carousel-wc>, <calendar-wc> and <date-picker>.
aria-pressed
Turns a <button> into a toggle button. Keep the label constant ("Mute alerts") and let the state change; do not also change the label to "Unmute".
1
<button type="button" data-toggle="aria-pressed" aria-pressed="false">Show archived</button>
Styled in VB: button[aria-pressed="true"] gets the active fill and an inner shadow; .secondary fills with the button colour, .ghost with the subtle tint, and forced-colours mode uses SelectedItem (src/native-elements/button/styles.css). menu.toolbar keeps pressed ghost buttons from losing their state on hover (src/native-elements/menu/styles.css).
Set for you by: data-toggle="aria-pressed" (flips true/false), list-mode data-sortable buttons (the active sort), and many components' toolbar buttons (<video-player>, <audio-player>, <reader-view>, <text-reader>, <highlight-wc>…).
aria-expanded
Says whether the thing a control opens is open. Put it on the control, not on the panel.
12345678910
<details> <summary>Filters</summary> …</details> <button type="button" popovertarget="sort-menu">Sort</button><menu id="sort-menu" popover>…</menu> <button type="button" aria-expanded="false" aria-controls="map-panel">Show map</button>
Styled in VB: dropdown triggers inside <nav> keep their hover fill while open and rotate their chevron (src/native-elements/nav/styles.css); <drop-down>, <bread-crumb>, <glossary-wc> and <version-switcher> style their own triggers.
Set for you by: data-toggle (when its target is a popover, or when it toggles data-state to an open value), data-spoiler, <tool-tip>, <accordion-wc>, <drop-down>, <combo-box>, <site-search>, <context-menu>, <command-palette> and other menu and picker components.
aria-disabled
Looks and is announced as disabled, but stays focusable, so users can find the control and read why it is unavailable. The browser does not block activation: your script must ignore clicks. Prefer disabled when nobody needs to discover the control.
12
<button type="button" aria-disabled="true" aria-describedby="publish-why">Publish</button><output id="publish-why" class="hint">Publishing unlocks once a reviewer approves.</output>
Styled in VB: button:is(:disabled, [aria-disabled="true"]) gets half opacity and a not-allowed cursor, and hover and active fills are suppressed (src/native-elements/button/styles.css); disabled wizard steps (src/native-elements/form/wizard.css) and many component items.
Set for you by: data-loading (with aria-busy, instead of disabled, so the submitter's name and value still reach the form data, src/utils/loading-button-init.js), the form coordinator on the submit button while a fetch submission runs (src/lib/form-coordinator.js), and the form wizard's step list.
aria-busy
Says an element is being updated. On a button it marks work in progress; on a region it asks screen readers to wait before announcing changes.
12
<button type="submit" data-loading="Saving…">Save changes</button>
Styled in VB: button[aria-busy="true"] and .button[aria-busy="true"] get a wait cursor, ignore pointer events and dim slightly (src/native-elements/button/styles.css); <theme-picker> and <popularity-index> style their busy states.
Set for you by: data-loading, the ticker effect, and components that fetch or stream content (<include-file>, <card-list>, <activity-feed>, <ai-chat>, <poll-wc>…).
aria-invalid
Marks a field whose value failed validation. Native constraint validation already exposes invalid state to assistive technology; VB adds aria-invalid where the browser's state is not enough, such as server-side errors.
12345
<form-field data-invalid> <label for="username">Username</label> <input type="text" id="username" name="username" value="priya"> <output class="error" for="username">That username is taken.</output></form-field>
Styled in VB: inputs, selects and textareas with [aria-invalid="true"] get the same treatment as :user-invalid, an error-coloured border with a thicker inline-start edge (a double border in forced-colours mode) (src/native-elements/input/styles.css); switches too (src/native-elements/input/switch.css).
Set for you by: <form-field>, which mirrors its invalid state (including an authored data-invalid) onto the control, and the form coordinator, which marks bare controls (outside <form-field>) on submit (src/lib/form-coordinator.js); also <combo-box>, <date-picker> and <time-picker>.
aria-sort
Put it on the one column header that the table is currently sorted by. Other headers have no aria-sort or none.
1
<th scope="col" data-sort aria-sort="descending">Joined</th>
Styled in VB: th[data-sort] draws ⇅, ↑ or ↓ from aria-sort, with empty alternative text so the arrow is not announced twice. With a sort button inside (added by data-sortable or <data-table>) the neutral ⇅ shows on unsorted columns; a bare server-sorted header shows only ↑ or ↓ (src/native-elements/table/styles.css).
Set for you by: data-sortable and <data-table>.
aria-selected
The selected item in a listbox, grid, tab list or tree. VB styles it only inside its own components (<combo-box>, <date-picker>, <site-map>, <notification-wc>), which also set it, as do <command-palette>, <site-search> and <calendar-wc>. For your own markup, a <select> or a group of radio buttons is almost always the right element.
aria-keyshortcuts
Describes a keyboard shortcut that script handles, so screen readers can announce it. It creates nothing by itself. VB does not style it.
12
<input type="search" id="search" data-hotkey="/" data-hotkey-action="focus">
Set for you by: data-hotkey action bindings (src/utils/hotkey-action-init.js; your own value wins), <context-menu> items, <command-palette> commands, <selection-menu>, <video-player> and <audio-player>.