Repository navigation
Overlay and navigation primitives on React Aria - #157
Merged
Merged
Conversation
…s Link and RouterProvider
…tabs on React Aria's Tabs
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #138. Part of #135.
Summary
The overlay and navigation primitives on
react-aria-components:<ConsoleRoutes> (app) <SessionPortContext> + <LinkRouter> <Console>Storybook's decorator wraps every story in
MemoryRouter+LinkRouter, so story links navigate client-side as in production.console.css, same values as the selectors they replace:The trigger's button reset reuses the values of
.menu button.nav-itemand.row;font:inheritis the one new keyword, so the button keeps the summary's 14px/1.5..menu-popwas already gone (the tracer moved it toPopoverprops).Stories with
playfunctions (axe on every story):ConfirmDialog:modal, alertdialog named and described, Cancel focused), Delete ("Cancel"/"Delete"), Busy (pending verb, Cancel disabled, Escape ignored), Escape cancels and hands the focus back, The keyboard confirms, Cancel closes itDisclosurearia-controls)Tabsaria-current, Tab between links, Enter navigates),Draft: Panels(ArrowRight/ArrowLeft wrap, selection follows focus, Tab to the panel)Links<a>), Linked rowIdentityCardButtonLinkButtonis<span role=link aria-disabled data-disabled>at opacity .5jsdom tests of these primitives moved into the stories (
ConfirmDialog.test.tsxremoved; the Tabs, Disclosure, TextLink, Row and IdentityCard blocks removed from the shared test files). Call-site tests updated for the new markup:StatePages,PublishProblems,ServiceProvidersPager.Evidence
Before: row, text and button links were react-router
Links and button tabs had no tab semantics; the dialog had no alertdialog role; the disclosure was<details>.After: production build under core's CSP, with the tracer's method (PR #154):
vite buildserved byphp -Swith a router that sendsSimpleSAML\Configuration::DEFAULT_SECURITY_HEADERSfromvendor/and the markup oftemplates/app.twig, API answered from fixtures, Playwright Chromium 1.65.1 with real key presses, listening forsecuritypolicyviolation, console errors and page errors, and listing<style>elements."Client-side" means a flag set on
windowafter the first load survived the navigation. Control run, same build, stylesheet link withoutid="react-aria-pressable-style":style-src-elem "inline"violation andreact-aria-pressable-stylelisted, so the listener is live.Collapsed card disclosure, measured in the same build: group 51 px high, as the
<details>was (49 px trigger + border).Page screenshots: unchanged.
npm run test:visualthree times on the pushed head:Tests 56 passed (56)×3, no reference touched.Checks, run locally on the pushed head:
composer testcomposer staticnpm run lintnpm run typechecknpm testnpm run test:visualcomposer buildpublic/assets/app/Departures
hreflinks stay native<a>. UnderRouterProvider, React Aria client-navigates every same-origin link through react-router, which would prefix core's pages (logout,#line-N) with the Console's basename.to(a Console route) goes through RACLink;href(any other address) is a plain<a>.IdentityCard's logout is one of these, soIdentityCardhas stories but no React Aria.TabswithTabPanels) have no board and no caller yet: storyDraft: Panels. The board's tabs are links (LinkTabs). API change: the oldTabswith per-tabtooronSelectis split intoLinkTabsandTabs({ tabs: {key, label, panel}[], selected, onSelect }). No call site used either.<dialog>focuses its first focusable descendant, which is now React Aria'stabindex=-1container; the dialog moves the focus to Cancel aftershowModal(), as before.keydownas well as oncancel. Storybook'suserEventsends synthetic events, which do not raise the native close request, and theplayfunctions must exercise Escape; real Escape goes through the same handler (the CSP run above uses real key presses).cancelremains for close requests without a key, such as a back gesture.isPending), notdisabled, so it keeps the focus; Cancel is still disabled while busy..grp-bodysits on adivinsideDisclosurePanel, not on the panel. The panel ishidden="until-found"(content-visibility), and padding on it would leave 16 px under a closed card.Merge Danger
Door: two-way
Front end only. Revertable.
Blast Radius: front-end
Linknow navigates throughLinkRouter; a page rendered without it (outsideConsoleRoutesor the Storybook decorator) would make full loads.TabsAPI split (no callers). DisabledLinkButtonis a<span>, styled through[data-disabled].main-*.js461 kB (Disclosure, Dialog, Tabs from React Aria).