Context
Neo.button.Base has a reactive pressed_ config (src/button/Base.mjs:124-128), and afterSetPressed (:384-389) toggles only the pressed CSS class. The engine's own grid search toolbar writes the attribute by hand next to set({pressed}) (src/grid/SearchToolbar.mjs:67, :262), and app code that wants an accessible toggle has to copy that.
- Design authority: the WAI-ARIA Authoring Practices button pattern: a toggle button exposes its state through
aria-pressed. pressed_ is documented as "The pressed state of the Button" with no semantics beyond the class.
The Problem
A screen reader announces a toggle button's state from aria-pressed. A Neo button with pressed: true reads as a plain button, and its state change is silent. Every consumer that wants the right semantics writes the attribute itself, in a second write next to the config, and can drift from pressed.
The Architectural Reality
pressed_ defaults to false, so afterSetPressed(false) runs for every button at construction. Today a plain button and a toggle that is off are the same state. Writing aria-pressed="false" on every button would announce plain buttons as toggles, so the attribute must stay off buttons that are not toggles.
toJSON() serializes pressed (:654).
- Engine code that sets
pressed: src/toolbar/Base.mjs, src/dashboard/dock/interaction/RevealOverlay.mjs, src/grid/SearchToolbar.mjs.
- Tab headers are buttons too.
Neo.tab.header.Button (role="tab") extends Neo.button.Base and calls super.afterSetPressed(), and Neo.tab.Container sets a Boolean pressed on every header (src/tab/Container.mjs:543, :904-906). A tab states its selection through aria-selected (test/playwright/unit/tab/Aria.spec.mjs); ARIA does not allow aria-pressed on role="tab".
The Fix
The button renders aria-pressed from pressed for toggle buttons only, in the same update that toggles the class. One shape: default pressed_ to null (not a toggle), and let afterSetPressed write aria-pressed for a Boolean and remove it for null. Check the existing pressed readers first (for example strict === false comparisons); if the default cannot move, an explicit toggle config is the alternative. Then SearchToolbar drops its manual writes. Tab headers keep aria-selected and render no aria-pressed.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
Neo.button.Base#pressed_ default |
WAI-ARIA APG button pattern |
null marks a plain button; a Boolean marks a toggle |
an explicit toggle config, if the default cannot move |
the config's JSDoc |
unit spec under test/playwright/unit/button/ |
Neo.button.Base#afterSetPressed |
same |
renders aria-pressed="true"/"false" for a Boolean and removes it for null, in the update that toggles the pressed class |
none |
method JSDoc |
same spec |
Neo.tab.header.Button, Neo.tab.header.EffectButton (role="tab") |
WAI-ARIA APG tabs pattern, test/playwright/unit/tab/Aria.spec.mjs |
keep aria-selected (a Boolean on every tab); never render aria-pressed |
none |
none |
a tab arm in the spec |
Toggle consumers that read pressed === false, e.g. the dock example's saved-perspective buttons |
test/playwright/unit/dashboard/DockZoneModel.spec.mjs |
declare pressed: false at creation, so they are toggles |
none |
none |
that spec stays green |
Neo.grid.SearchToolbar case button |
this ticket |
no hand-written aria-pressed |
none |
none |
its existing specs |
Acceptance Criteria
Out of Scope
aria-expanded on menu buttons, the selection semantics of tab headers, toggle groups.
Avoided Traps
aria-pressed on every button: it announces plain buttons as toggles.
aria-pressed on tab headers: a tab's state is its selection.
Related
#20735 (the visual half: pressed background, text and glyph tokens) · #15324 (native disabled semantics on button.Base, the same class of gap).
Live latest-open + closed sweep: latest 20 open read (32 open, orange band; no owning accessibility epic) + closed search ("button pressed aria", "toggle button accessibility"; #15324's Out of Scope read) + A2A claims of the last hour + Memory Core + own assignments at 2026-11-12T16:30Z; no equivalent or prior exclusion found.
Edit 2026-11-12 19:2xZ (ticket author): added the tab-header row, AC and trap, and the Contract Ledger, after both open PRs showed tabs gaining aria-pressed. The tab invariant was implied by Out of Scope and is now stated.
unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Origin Session ID: 2051845f-04a4-4248-a5b5-a633fd710e5a
Retrieval Hint: "button pressed aria-pressed toggle semantics"
Context
Neo.button.Basehas a reactivepressed_config (src/button/Base.mjs:124-128), andafterSetPressed(:384-389) toggles only thepressedCSS class. The engine's own grid search toolbar writes the attribute by hand next toset({pressed})(src/grid/SearchToolbar.mjs:67, :262), and app code that wants an accessible toggle has to copy that.aria-pressed.pressed_is documented as "The pressed state of the Button" with no semantics beyond the class.The Problem
A screen reader announces a toggle button's state from
aria-pressed. A Neo button withpressed: truereads as a plain button, and its state change is silent. Every consumer that wants the right semantics writes the attribute itself, in a second write next to the config, and can drift frompressed.The Architectural Reality
pressed_defaults tofalse, soafterSetPressed(false)runs for every button at construction. Today a plain button and a toggle that is off are the same state. Writingaria-pressed="false"on every button would announce plain buttons as toggles, so the attribute must stay off buttons that are not toggles.toJSON()serializespressed(:654).pressed:src/toolbar/Base.mjs,src/dashboard/dock/interaction/RevealOverlay.mjs,src/grid/SearchToolbar.mjs.Neo.tab.header.Button(role="tab") extendsNeo.button.Baseand callssuper.afterSetPressed(), andNeo.tab.Containersets a Booleanpressedon every header (src/tab/Container.mjs:543,:904-906). A tab states its selection througharia-selected(test/playwright/unit/tab/Aria.spec.mjs); ARIA does not allowaria-pressedonrole="tab".The Fix
The button renders
aria-pressedfrompressedfor toggle buttons only, in the same update that toggles the class. One shape: defaultpressed_tonull(not a toggle), and letafterSetPressedwritearia-pressedfor a Boolean and remove it fornull. Check the existingpressedreaders first (for example strict=== falsecomparisons); if the default cannot move, an explicit toggle config is the alternative. ThenSearchToolbardrops its manual writes. Tab headers keeparia-selectedand render noaria-pressed.Contract Ledger
Neo.button.Base#pressed_defaultnullmarks a plain button; a Boolean marks a toggletest/playwright/unit/button/Neo.button.Base#afterSetPressedaria-pressed="true"/"false"for a Boolean and removes it fornull, in the update that toggles thepressedclassNeo.tab.header.Button,Neo.tab.header.EffectButton(role="tab")test/playwright/unit/tab/Aria.spec.mjsaria-selected(a Boolean on every tab); never renderaria-pressedpressed === false, e.g. the dock example's saved-perspective buttonstest/playwright/unit/dashboard/DockZoneModel.spec.mjspressed: falseat creation, so they are togglesNeo.grid.SearchToolbarcase buttonaria-pressedAcceptance Criteria
pressed: trueorpressed: falserendersaria-pressed="true"/"false"and keeps it in sync on every change, in the update that toggles thepressedclass.pressedrenders noaria-pressed.role="tab") rendersaria-selectedand noaria-pressed.src/grid/SearchToolbar.mjswrites noaria-presseditself, and its case button still follows the filter.test/playwright/unit/button/covers the plain, pressed and unpressed states through the vdom.Out of Scope
aria-expandedon menu buttons, the selection semantics of tab headers, toggle groups.Avoided Traps
aria-pressedon every button: it announces plain buttons as toggles.aria-pressedon tab headers: a tab's state is its selection.Related
#20735 (the visual half: pressed background, text and glyph tokens) · #15324 (native
disabledsemantics onbutton.Base, the same class of gap).Live latest-open + closed sweep: latest 20 open read (32 open, orange band; no owning accessibility epic) + closed search ("button pressed aria", "toggle button accessibility"; #15324's Out of Scope read) + A2A claims of the last hour + Memory Core + own assignments at 2026-11-12T16:30Z; no equivalent or prior exclusion found.
Edit 2026-11-12 19:2xZ (ticket author): added the tab-header row, AC and trap, and the Contract Ledger, after both open PRs showed tabs gaining
aria-pressed. The tab invariant was implied by Out of Scope and is now stated.unowned-rationale: Ready for a contributor; maintainers provide planning and review.
Origin Session ID: 2051845f-04a4-4248-a5b5-a633fd710e5a Retrieval Hint: "button pressed aria-pressed toggle semantics"