Repository navigation
test(a11y): add Tooltip contract and bind Tooltip - #7799
Conversation
|
AI review status for this pull request.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsTooltip (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression46 of 488 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
The tooltip contract and binding are well evidenced on this head, and the hover-bridge failure is recorded exactly; approval now waits on a maintainer decision about two expectations. A maintainer needs to identify the current record that adopts "focus leaving the trigger hides the tooltip" and "hovering the trigger shows it" as required outcomes, since spec:AST-020 FR15 names the role, name, state and relationship properties and Tab plus Enter or Space activation and component:Tooltip is still draft, or have tooltip.focus.leaving-hides and tooltip.hover.shows-on-hover report as advisory until it does. Two test changes are needed either way:
- Add
focusTriggerto the binding inventory, as a state or as an exclusion naming its owner, because'never'turns off the required keyboard-focus row (AST-021 FR4). - Drop or rewrite the role and
aria-describedbyassertions inTooltip.test.tsx:87-98, which the binding's jsdom lane now owns inside the required test gate, or name a removal blocker for them (AST-021 FR6).
[Automated review]
| appliesWhen: ALWAYS, | ||
| evidenceLayer: 'real-browser', | ||
| alsoNeeds: ['dom'], | ||
| enforcement: 'required', |
There was a problem hiding this comment.
This row gates as required with spec:AST-020 FR15 as its only primary source. FR15's text adopts the role, the accessible name, the state and relationship properties, and activation by Tab plus Enter or Space, and leaves naming the adopted parts to the owning component record; component:Tooltip is still draft, and family:overlay-dismissal AV4 leaves focus-loss dismissal to the member. Approval waits on a maintainer identifying the current record that adopts this outcome, or on this row reporting as advisory (with advisoryBecause) like tooltip.hover.leaving-hides.
| appliesWhen: ALWAYS, | ||
| evidenceLayer: 'real-browser', | ||
| alsoNeeds: ['dom'], | ||
| enforcement: 'required', |
There was a problem hiding this comment.
Same question as tooltip.focus.leaving-hides: no WCAG criterion is cited and FR15's text does not name showing on hover, so required here needs a current adopting record, or an advisory classification until component:Tooltip names it.
| }, | ||
| ] as const satisfies ReadonlyArray<TooltipBindingState>; | ||
|
|
||
| export const TOOLTIP_EXCLUSIONS = [ |
There was a problem hiding this comment.
focusTrigger ('auto' | 'always' | 'never') decides whether Tab onto the trigger shows the tooltip (useTooltip.tsx:489-497), but no state binds it and this list does not exclude it. With 'never', the required keyboard-focus row cannot pass. AST-021 FR4 asks for a state, or an exclusion that names its owner and reason, plus its id in the inventory test.
There was a problem hiding this comment.
Making focus-leaving and hover-showing advisory settles the earlier spec question, and the contract, fixtures and binding pass in Chromium on this head with the hover-bridge failure recorded exactly. A few changes are still needed before this can be approved:
- The
focus-triggerexclusion says no shipped composition passesfocusTrigger: 'always', but 24 core call sites do for their disabled-reason tooltips (for exampleTextInput.tsx:358andSwitch.tsx:607), so bind an'always'state or name those hosts and the tests that own their keyboard path (AST-021 FR4). - Removing the duplicate test in
Tooltip.test.tsxalso dropped itscontenttext assertion, which no binding row covers in jsdom, so keep that assertion locally (AST-021 FR5 and FR6). internal/a11y-spec/README.mdstill lists focus leaving and hover showing as gating outcomes adopted under AST-020 FR15; mark them advisory there.- At 2,033 authored lines the change is larger than one review should carry; landing the harness
hover()andpointerAway()primitives with their self-tests first brings it under 2,000.
[Automated review]
| { | ||
| id: 'focus-trigger', | ||
| owner: | ||
| "the caller that passes focusTrigger 'never' or 'always' (no shipped Astryx composition does), and the focusTrigger prop docs in Tooltip.doc.mjs", |
There was a problem hiding this comment.
This says no shipped composition passes focusTrigger: 'always', but 24 Tooltip and useTooltip call sites in packages/core/src do (for example TextInput.tsx:358, Switch.tsx:607, CheckboxInput.tsx:376) for their disabled-reason tooltips, where focusin bubbling from the focused control is the only keyboard path to the hint (useTooltip.tsx:489-497). AST-021 FR4 needs that state bound, or an exclusion that names those hosts and the tests that own their keyboard path.
| </Tooltip>, | ||
| ); | ||
| const layer = screen.getByRole('tooltip', {hidden: true}); | ||
| expect(layer).toHaveTextContent('Tooltip text'); |
There was a problem hiding this comment.
This content assertion is component-specific (the public content prop reaching the layer), and no binding row proves it in jsdom; AST-021 FR6 asks for the test to be rewritten to keep it rather than deleted with the role and aria-describedby checks.
| | `menu-button` | [APG Menu Button](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/) required parts; the optional ArrowDown/ArrowUp opens Astryx ships are advisory | Anchored DropdownMenu and MoreMenu triggers: button role and name, `aria-haspopup="menu"`, `aria-expanded`, `aria-controls`, Enter/Space open on the first enabled item (advisory: ArrowDown on the first, ArrowUp on the last) | | ||
| | `menu` | [APG Menu and Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) menu; arrows (with wrap) and Home/End per AST-020 FR15; typeahead advisory | DropdownMenu pointer menu: named `menu`, item roles/names, `aria-checked`, `aria-disabled`, arrows with wrap, Home/End, Enter and Escape back to the trigger, Tab out (advisory: typeahead) | | ||
| | `toolbar` | [APG Toolbar](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/); arrows (with wrap) and Home/End per AST-020 FR15 | Toolbar: named `toolbar`, `aria-orientation`, controls inside it, one Tab stop entering on the first enabled control, next/previous arrows (RTL-mirrored, Down/Up when vertical) with wrap, Home/End | | ||
| | `tooltip` | [APG Tooltip](https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/) required parts per AST-020 FR15; WCAG 2.2 1.4.13; pointer leaving advisory | Tooltip and useTooltip: `tooltip` role, trigger `aria-describedby` and computed description, keyboard focus shows it with focus kept on the trigger, Escape dismisses (focus- and hover-shown), focus leaving hides, hover shows and keeps it over the trigger and the tooltip (advisory: pointer leaving hides) | |
There was a problem hiding this comment.
tooltip.focus.leaving-hides and tooltip.hover.shows-on-hover are advisory at this head, but this row (and the tree line at line 57) still lists them as bound outcomes under "required parts per AST-020 FR15"; mark them advisory, the way the accordion row names its advisory rows.
…in one step (#7802) <!-- template: bug-fix.md --> ## User impact A mouse user who moves straight from a Tooltip's trigger onto the tooltip, in one pointer step across the small gap as a quick hand does, sees the tooltip disappear about a tenth of a second after the pointer lands on it. They cannot rest on it to read it or magnify it. A slow move that pauses in the gap keeps it open, so the failure depends on hand speed. Every `Tooltip` and `useTooltip` attachment shares this hover handling. ## Problem and solution fit - Why it happens: `useTooltip` cancels its pending hide in the tooltip surface's React `onMouseEnter`. React derives that event from the browser's `mouseout`, which on a single pointer step fires before the trigger's native `mouseleave`. So the order is cancel, then schedule: the trigger's leave schedules the 100 ms hover-bridge hide after it was already cancelled, and it runs. - Why it harms: the tooltip closes under the pointer even though the pointer is on it. - Why that matters: WCAG requires hover content to stay while the pointer is over it, and the hook's hover bridge exists for exactly this case. The trigger's leave now checks where the pointer went (`relatedTarget`). When that is inside the tooltip surface, it does not schedule a hide; the surface's own mouse leave schedules one when the pointer leaves the tooltip. Every other leave behaves as before. ## Expected behavior and authority - `spec:AST-020` FR1 (current): WCAG 2.2 Level A and AA are the conformance baseline. 1.4.13 Content on Hover or Focus (AA), Hoverable: "the pointer can be moved over the additional content without the additional content disappearing". - APG Tooltip pattern: the tooltip remains open while the cursor is over the trigger or the tooltip. - The hook already promises this: its hover bridge is documented as letting the pointer travel from the trigger onto the tooltip surface for WCAG 1.4.13. - The Tooltip accessibility contract in #7799 records this as a known failure in every Tooltip state (`tooltip.hover.stays-while-hovered`). ## Smallest restoration - `useTooltip`'s trigger `mouseleave` handler skips `scheduleHide()` when `relatedTarget` is inside the tooltip surface (looked up by the layer id in the pointer target's own document). - No prop, default, timing, or visual change. Focus, tap, controlled `isOpen`, and explicit `hideDelay` paths are untouched. ## Evidence - Reproduction before the change: in Chromium, on the Tooltip Default story, hover the trigger until the tooltip shows, then move the mouse onto the tooltip in one step. The tooltip hides within ~100 ms (3/3 runs). - Result after the change: the same move leaves the tooltip open after 400 ms (3/3 runs). - Representative unchanged path: moving off the tooltip onto the page still hides it, before and after the change; the existing hover-bridge, hide-delay and touch tests pass unchanged. - Regression test or other mutation-sensitive proof: - `TooltipHoverBridge.a11y.chromium.spec.ts` (real Chromium, real mouse input) fails on `main` and passes here; it runs in the `pr-a11y` job. - A `useTooltip.test.tsx` case dispatches the browser's order (`mouseout`, then a raw `mouseleave`, both pointing at the tooltip) and fails on `main`. Note for #7799: once this lands, that PR's known-failure records for `tooltip.hover.stays-while-hovered` become unexpected passes. Whichever of the two lands second should delete them. ## Scope - [x] One defect is restored. - [x] Separable contradictory or unsettled tagalongs were removed or split. - [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. - [x] Public text and artifacts contain no internal Meta context. ## Testing - `pnpm exec vitest run packages/core/src/Tooltip`: 2 files, 47 tests pass; the new case fails without the fix. - Playwright Chromium against built Storybooks of this branch and of `main`'s `useTooltip`: one-step crossing passes 3/3 here, fails 3/3 on `main`; leaving the tooltip hides it in both. - `pnpm -F @astryxdesign/core typecheck`, ESLint, Prettier, `pnpm check:changesets`: pass.
03c83f0 to
83c87dc
Compare
There was a problem hiding this comment.
The earlier requests are all addressed, and the Tooltip contract and binding now pass every row in all four states in Chromium. One change is still needed before approval: TooltipHoverBridge.a11y.chromium.spec.ts ("a one-step move from the trigger onto the tooltip keeps it open") checks the same outcome as the binding's required tooltip.hover.stays-while-hovered row in the same pr-a11y job, so either remove that test or list it under "Duplicate assertions (AST-021 FR6)" with its removal blocker (for example, that its step runs on every pr-a11y run while the binding's step is path-scoped). A small, non-blocking correction: the focus-trigger exclusion counts Timestamp, which passes focusTrigger="always" to HoverCard, and leaves out the Slider value-bubble <Tooltip focusTrigger="always">.
[Automated review]
| }, | ||
| }, | ||
| { | ||
| id: 'tooltip.hover.stays-while-hovered', |
There was a problem hiding this comment.
This required row now proves the outcome packages/core/src/Tooltip/__tests__/TooltipHoverBridge.a11y.chromium.spec.ts:53-64 asserts ("a one-step move from the trigger onto the tooltip keeps it open"), at the same real-browser layer and in the same pr-a11y job. AST-021 FR6 asks the migration to remove or rewrite that local test, or to name its removal blocker; the "Duplicate assertions" ledger does neither. Naming the blocker (for example, that the hover-bridge step runs on every pr-a11y run while this binding's step is path-scoped) or deleting that one test settles it.
| { | ||
| id: 'focus-trigger', | ||
| owner: | ||
| "the 24 core hosts that pass focusTrigger 'always' — the disabledMessage tooltips on the field and choice controls (TextInput, TextArea, NumberInput, Switch, CheckboxInput, CheckboxList, RadioList, Selector, MultiSelector, SegmentedControl, Slider, Typeahead, Tokenizer, FileInput, and the date and time inputs), ProgressBar marks and Timestamp — each through its own suite (for example TextInput.test.tsx 'shows the reason tooltip on keyboard focus'); and any caller that passes 'never'", |
There was a problem hiding this comment.
Non-blocking: Timestamp's focusTrigger="always" goes to HoverCard (Timestamp/TimestampHoverCard.tsx:253), which the interactive-hover-content exclusion already assigns elsewhere, while the Slider value bubble's <Tooltip focusTrigger="always"> (Slider/Slider.tsx:1020) is not named. Swapping the two keeps the count of 24 Tooltip and useTooltip call sites accurate.
There was a problem hiding this comment.
The Tooltip contract and binding are well evidenced: every row passes in all four states in Chromium, and the description now names each retained duplicate test with its removal blocker. One change is needed before approval: WCAG 1.4.13's "Persistent" requirement is checked only for hover, so the keyboard row never checks that the tooltip stays, and a focus-only tooltip that hides itself while focus stays on the trigger passes every required row. Please add a required check (or extend tooltip.focus.shows-on-keyboard-focus) that waits after Tab and asserts the tooltip is still visible with focus kept, with a focus-only fixture that hides itself as its violating twin; all four Tooltip states already keep the tooltip open, so it should pass with no known failure.
[Automated review]
| }, | ||
| }, | ||
| { | ||
| id: 'tooltip.focus.shows-on-keyboard-focus', |
There was a problem hiding this comment.
WCAG 1.4.13 "Persistent" also covers content that keyboard focus shows: it must stay visible until focus leaves, the user dismisses it, or it is no longer valid. This row stops once the tooltip appears with focus kept, and tooltip.hover.stays-while-hovered checks persistence only when hover shows the tooltip, so the contract's own violating-times-out fixture passes this row and a focus-only tooltip that hides itself 500 ms after Tab passes every required row. Please add a required row (or a PERSIST_MS wait here) asserting the tooltip is still visible with focus on the trigger, with a focus-only self-hiding fixture as its violating twin in TOOLTIP_MUTATIONS (AST-020 FR5, FR9, FR10). All four Tooltip states already pass it.
| verifiedBy: | ||
| "the layer runtime's anchor-placement tests and page-level review of sticky surfaces", | ||
| reason: | ||
| 'The tooltip is placed beside its trigger by the layer runtime, so whether it or another surface hides a focused control is placement and page geometry; this contract proves it leaves when focus does.', |
There was a problem hiding this comment.
Non-blocking: tooltip.focus.leaving-hides is advisory, so the contract reports that the tooltip leaves when focus does but never gates it; "reports" would be accurate here and in the 2.1.2 exemption's verifiedBy (line 580).
| owner: | ||
| "the composing components' own contracts (Button for the IconButton label tooltip, the field status binding for FieldStatus) and their tests", | ||
| reason: | ||
| 'IconButton, FieldStatus and Lab InfoTip render Tooltip or useTooltip for their own purposes; this binding proves the tooltip they render, and what each host adds around it is that host.', |
There was a problem hiding this comment.
Non-blocking: FieldStatus renders no tooltip (packages/core/src/FieldStatus/FieldStatus.tsx:138-139); the on-field status tooltip comes from useInputStatusIcon (packages/core/src/hooks/useInputStatusIcon.tsx:153), so that is the host to name here.
There was a problem hiding this comment.
The Tooltip contract and binding are well evidenced, and the keyboard row's new persistence check closes the last gap: every row passes in all four Tooltip states in Chromium. One change is needed before approval: at 2,004 authored lines this pull request is over the 2,000-line limit for a single review, so please land the harness hover() and pointerAway() primitives and their two self-tests in their own pull request first, which leaves about 1,870 lines here. While rebasing, the description's “Not adopted here” list should name useInputStatusIcon instead of FieldStatus, and its Evidence section should report this head's run. The failing test check comes from an unrelated packages/cli timing test (cache.test.mjs), so a rerun should clear it.
[Automated review]
e58a320 to
2b2240d
Compare
2b2240d to
a616d2c
Compare
a616d2c to
d2e32e5
Compare
d2e32e5 to
c1849dc
Compare
TOOLTIP_PATTERN encodes the APG Tooltip pattern's role and relationship under AST-020 FR15 and WCAG 2.2 2.1.1 and 1.4.13: the tooltip role, the trigger described by it, keyboard focus showing it and keeping it while focus stays, Escape dismissing it whether focus or hover showed it, and hover keeping it while the pointer rests on the trigger or the tooltip. Blur dismissal, hover showing and pointer-leave hiding report as advisory. Binds Tooltip (wrapped element, text, anchorRef) and useTooltip in four no-visual states with a scoped pr-a11y step, and rewrites the Tooltip.test.tsx role/aria-describedby test the binding now owns down to its content assertion. Builds on the harness hover/pointerAway primitives. Test-only.
c1849dc to
09e3987
Compare
There was a problem hiding this comment.
Recommending approval: all nine tooltip rows pass in every Tooltip binding state in real Chromium at this head, the earlier requested changes are in, and nothing here changes Tooltip's runtime behavior. One small, non-blocking fix to the description: its duplicate-assertion ledger says the binding's browser step runs when the Chromium harness changes, but the step's scope pattern in .github/workflows/ci.yml no longer includes the harness, so either drop that clause (and name the hover-bridge spec's second test, which stays the only gate for pointer-leave hiding) or add internal/a11y-spec/src/harness to the pattern.
[Automated review]
| && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then | ||
| scope=0 | ||
| bash "$helper" "$BASE_SHA" \ | ||
| '^(internal/a11y-spec/src/patterns/tooltip\.|packages/core/src/Tooltip/|apps/storybook/stories/TooltipA11y)' || scope=$? |
There was a problem hiding this comment.
Non-blocking: this pattern does not include internal/a11y-spec/src/harness, but the description's duplicate-assertion ledger says the binding's step also runs when the Chromium harness changes. Either drop that clause from the description (and name TooltipHoverBridge's second test, which stays the only gate for pointer-leave hiding), or add the harness path here, as the Slider, Tree View, Alert Dialog, Grid and Window Splitter steps do.
What this proves
Tooltip and
useTooltipnow have an executable Tooltip contract and a binding. A keyboard, screen-reader, or mouse user meeting an Astryx tooltip gets: a popup with thetooltiprole; a trigger whosearia-describedbynames that popup, so the browser computes the tooltip's text into the trigger's description; the tooltip shown when they Tab onto the trigger and kept while focus stays there; Escape hiding it without moving focus or the pointer, whether focus or hover showed it; the tooltip gone when focus leaves; the tooltip shown when they rest the pointer on the trigger, and kept while the pointer stays there or moves onto the tooltip itself; and (advisory) the tooltip gone when the pointer leaves both.Test-only: no runtime, docs, record, or Changeset change.
component:Tooltipis a draft record, so AST-021 FR12's evidence backlink does not apply.Adoption source.
spec:AST-020FR15 (current) adopts the parts it names: Tooltip plays the tooltip role, so it takes the role and thearia-describedbyrelationship. A tooltip is not a composite control, so it gains no arrow or Home/End keys. WCAG 2.2 is the primary source for the other required rows: 2.1.1 (keyboard focus reaches the hint, focus stays on the trigger) and 1.4.13 AA (the focus-shown tooltip persists while focus stays; Escape dismisses; hover content stays while hovered — applying only where hover can show the tooltip). The pattern's blur dismissal, hover showing and mouse-out hiding are not among the parts FR15 names andcomponent:Tooltipis draft, so those three rows are advisory (AST-020 FR9) until a current record adopts them. No behavior changes; every expectation describes what Tooltip does today.Expectations (AST-020 FR13)
tooltip.surface.roletooltip.trigger.described-by-tooltiptooltip.trigger.descriptiontooltip.focus.shows-on-keyboard-focustooltip.keys.escape-dismissestooltip.focus.leaving-hidestooltip.hover.shows-on-hovertooltip.hover.stays-while-hoveredtooltip.hover.leaving-hidesExemptions name an owner for every other checklist dimension: the trigger's own role, name, activation and pointer behavior → the trigger's own pattern (button, link); content inside a tooltip, including that it holds nothing focusable → caller content (interactive hover content is a non-modal dialog such as HoverCard); touch and press-to-hide → the binding's own tests (remainder only); placement and focus-obscured geometry → the layer runtime and the page; paint, contrast, forced colors, motion → the component styling, layer animations and theme; page title, language, onward Tab order → the page; status messages → the status-message pattern and AST-009.
Bindings and states
wrapped-button<Tooltip>around aButton: the Button becomes the described triggertext-trigger<Tooltip>around plain text: Tooltip renders its own focusable inline triggeranchor-ref-with-hint<Tooltip anchorRef>on a caller button already described by a visible hint:aria-describedbycarries bothuse-tooltip-hookuseTooltipon a caller button with the hook'srefanddescribedByKnown failures: none. The first Chromium run on this PR found every state failing
tooltip.hover.stays-while-hovered— a pointer moving straight from the trigger onto the tooltip hid it — and #7802 has since fixed that onmain(the surface's ReactonMouseEnterran before the trigger's nativemouseleavescheduled the hide). This branch is rebased on that fix, so the row passes and no ledger is needed.Not adopted here, each with its owner
focusTrigger'always'/'never': 24 core hosts pass'always'— thedisabledMessagetooltips on the field and choice controls, the Slider value bubble and ProgressBar marks — so focus on the control inside a non-focusable wrapper shows the hint; the described and focused elements differ, so each host's own suite proves its keyboard path (for exampleTextInput.test.tsx"shows the reason tooltip on keyboard focus").'never'hands focus to a composite widget that owns how a keyboard user reaches the hint; no shipped composition uses it. Every state uses the default'auto'.touchTrigger): there is no hover on a finger;useTooltip.test.tsxandTooltip.test.tsxtouch suites throughuseTouchTrigger.isOpen) and disabled (isEnabled) tooltips: visibility belongs to the caller; the controlled and disabled suites.useInputStatusIconon-field status tooltip, Lab InfoTip): they render Tooltip oruseTooltip, which this binding proves; the host's additions are the host's.Tooltip.test.tsx, layer anchor tests and the visual gate.Harness
The hover rows use the harness
hover(subject)andpointerAway()primitives, which landed with their self-tests in #7828.Duplicate assertions (AST-021 FR6)
Tooltip.test.tsx"gives the tooltip layer role="tooltip" linked from the trigger" becomes "renders the content prop inside the tooltip layer": its role andaria-describedbychecks are owned bytooltip.surface.roleandtooltip.trigger.described-by-tooltipon every binding state in the jsdom lane, inside the required test gate; thecontentassertion stays. Mutation checks: hard-coding the layer role tostatusfails all four binding states; dropping the wrapped-elementaria-describedbywrite failswrapped-button.TooltipHoverBridge.a11y.chromium.spec.ts("a one-step move from the trigger onto the tooltip keeps it open", from fix(Tooltip): keep the tooltip open when the pointer crosses onto it in one step #7802) proves the same outcome astooltip.hover.stays-while-hovered, but its pr-a11y step runs on every pull request while this binding's step runs only when Tooltip, its stories, or the contract change; it stays until the binding's step runs unscoped or in a required gate.Tooltip.test.tsxanduseTooltip.test.tsxhover-delay, Escape-through-the-layer-stack, touch, controlled-state and placement tests run with fake timers in jsdom; the contract's browser rows that cover the same user outcomes run only in the non-required pr-a11y job, scoped to Tooltip changes, so the jsdom tests stay until that lane is a required gate.Shape
internal/a11y-spec/src/patterns/tooltip.ts—TOOLTIP_PATTERN: 9 expectations; APG wording checked against the published pattern on 2026-10-21.tooltip.fixtures.ts— a plain HTML tooltip on a trigger between two page buttons, in four conforming (one shown by focus only, which claims no hover) and fourteen violating forms (including a focus-only tooltip that hides itself while focus stays); every expectation has at least one violating twin.tooltip.jsdom.test.tsandtooltip.chromium.spec.ts— the contract self-test in both lanes.packages/core/src/Tooltip/__tests__/Tooltip.a11y.{states,renders,test}.ts(x)andTooltip.a11y.chromium.spec.ts— the four states above.apps/storybook/stories/TooltipA11y.stories.tsx— oneno-visualstory per state, rendered from the shared renders so the lanes cannot drift..github/workflows/ci.yml— "Run Tooltip accessibility contract" step plus its evidence upload; runs when Tooltip, the stories, or the contract change.Evidence
aria-describedbyfrom theuse-tooltip-hooktrigger fails that binding state.tsc(a11y-spec, core), eslint, Prettier, and the repository pre-push checks clean.e58a320(pr-a11y, "Run Tooltip accessibility contract"): contract fixtures (4 conforming pass every applicable row, every violating check fails its own expectation), every expectation exercised, and all four Tooltip states pass every row. Earlier heads:917f380found the hover-bridge defect fix(Tooltip): keep the tooltip open when the pointer crosses onto it in one step #7802 has since fixed. This head splits the harness into test(a11y): add hover and pointerAway to the accessibility harness #7828 with no change to the contract or binding; its pr-a11y run re-proves them. The pr-a11y axe audit reported 0 issues on the four new stories.Scope