Skip to content

feat(app-ui): add SkipLink and Main - #856

Merged
cakeinpanic merged 4 commits into
feat/app-ui-page-contentfrom
feat/app-ui-skip-link
Oct 30, 2026
Merged

cakeinpanic merged 4 commits into
feat/app-ui-page-contentfrom
feat/app-ui-skip-link

Conversation

@exromany

Copy link
Copy Markdown
Contributor

Adds a keyboard "Skip to content" link and a <main> landmark it targets by default.

  • SkipLink — render first in the layout; hidden until Tab-focused, then moves focus to href (default #main-content). Adds tabindex=-1 to non-focusable targets and prevents the hash change (Safari skips focus otherwise; avoids triggering SPA routers). Missing target → plain anchor behaviour. Consumer onClick runs first; its preventDefault opts out.
  • Main — <main id="main-content">, flex: 1 so Footer sticks to the bottom on short pages. No focus ring when SkipLink focuses it.
  • New token --lido-app-ui-shadow-popover.

@exromany
exromany requested a review from a team as a code owner October 19, 2026 16:07
@preview-stands

preview-stands Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Preview stand status

Stand was demolished

@exromany
exromany force-pushed the feat/app-ui-skip-link branch from 1f4a63d to 697bb48 Compare October 21, 2026 08:42

@cakeinpanic cakeinpanic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Story for main is missing
+
Image

Maybe consider creating some story or smth alike for all layout components together to display how they are supposed to be used.

@exromany
exromany force-pushed the feat/app-ui-skip-link branch 2 times, most recently from 6686c3c to 9653ea2 Compare October 24, 2026 16:12
@exromany
exromany changed the base branch from main to feat/app-ui-page-content October 24, 2026 16:12
@exromany
exromany added this pull request to stack #871 October 24, 2026 17:23
@exromany
exromany force-pushed the feat/app-ui-skip-link branch from 4f61383 to 078444e Compare October 27, 2026 09:22
@cakeinpanic
cakeinpanic requested a balanced review from Copilot October 28, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The skip-link implementation permanently removes naturally focusable targets from the normal Tab sequence by assigning tabindex="-1", disrupting keyboard navigation.

1 open issue
What changed in this PR

Adds keyboard skip navigation and a matching main-content landmark to lido-app-ui, integrating both into the library’s exports, tests, and Storybook documentation.

Changes:

  • Adds SkipLink with focus handling, custom targets, and focus-revealed styling.
  • Adds Main with a default target ID and flexible sizing for page layouts.
  • Adds component tests, usage stories, smoke coverage, and a popover shadow token.
File Description
packages/​lido-app-ui/​styles/​tokens.css Adds the popover shadow token.
packages/​lido-app-ui/​src/​smoke.test.tsx Adds smoke coverage for both components.
packages/​lido-app-ui/​src/​skip-link/​SkipLink.tsx Implements skip navigation and target focus handling.
packages/​lido-app-ui/​src/​skip-link/​SkipLink.test.tsx Tests targeting, focus, fallback behavior, and props.
packages/​lido-app-ui/​src/​skip-link/​SkipLink.stories.tsx Demonstrates keyboard activation.
packages/​lido-app-ui/​src/​skip-link/​SkipLink.module.css Styles the focus-revealed link with reduced-motion support.
packages/​lido-app-ui/​src/​skip-link/​index.ts Exports SkipLink and its props.
packages/​lido-app-ui/​src/​page-layout/​Main.tsx Adds the main landmark with a default ID.
packages/​lido-app-ui/​src/​page-layout/​Main.test.tsx Tests props and SkipLink integration.
packages/​lido-app-ui/​src/​page-layout/​Main.stories.tsx Demonstrates page layouts and custom target IDs.
packages/​lido-app-ui/​src/​page-layout/​Main.module.css Adds flexible sizing and suppresses the landmark focus outline.
packages/​lido-app-ui/​src/​page-layout/​index.ts Exports Main and its props.
packages/​lido-app-ui/​src/​index.ts Exposes SkipLink through the package entry point.

Review effort: Balanced

@exromany
exromany requested a review from cakeinpanic October 28, 2026 13:49
@exromany
exromany force-pushed the feat/app-ui-skip-link branch from 56f69d8 to 23f05cd Compare October 28, 2026 16:39
@cakeinpanic
cakeinpanic force-pushed the feat/app-ui-skip-link branch 2 times, most recently from 79784c5 to 478804c Compare October 29, 2026 10:58

@cakeinpanic cakeinpanic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exromany
exromany force-pushed the feat/app-ui-skip-link branch from 478804c to 0ea1956 Compare October 29, 2026 14:46
@exromany
exromany force-pushed the feat/app-ui-skip-link branch from 0ea1956 to 4ab4488 Compare October 30, 2026 10:48
@cakeinpanic
cakeinpanic self-requested a review October 30, 2026 14:54
@exromany
exromany force-pushed the feat/app-ui-skip-link branch from 4ab4488 to 93e8739 Compare October 30, 2026 14:55
@cakeinpanic
cakeinpanic merged commit c8a2c77 into main Oct 30, 2026
9 of 19 checks passed
@cakeinpanic
cakeinpanic deleted the feat/app-ui-skip-link branch October 30, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants