You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: span banner across main frame above right sidebar - #4418
Moves <Banner /> out of <main> in Page.astro so it sits above <TwoColumnContent /> inside .main-frame. On wide viewports (>= 72rem) with a table of contents, the banner now spans the full width of the content area (both .main-pane and .right-sidebar-container) and appears centered instead of being constrained to .main-pane.
Updates .right-sidebar sticky positioning in TwoColumnContent.astro (top: var(--sl-nav-height), height: calc(100vh - var(--sl-nav-height)), border moved onto .right-sidebar) so the right sidebar starts below the banner at scroll top and pins beneath the navbar when scrolling.
Adds role="region" and a localized aria-label (banner.accessibleLabel, seeded in built-in translation files since builtinI18nSchema() requires all keys) to Banner.astro so the banner remains a unique accessible landmark outside <main>.
Updates starlight-toc.ts to continue observing .sl-banner now that it is no longer a descendant of <main>.
Adds Playwright E2E assertions covering banner alignment, landmark attributes, and sticky right-sidebar scroll behavior in packages/starlight/__e2e__/basics.test.ts, plus an @astrojs/starlight patch changeset.
Local verification after final edits:
Build and publint check (pnpm --filter '@astrojs/*' build)
Example build and size-limit check (pnpm --filter @example/starlight-basics build and pnpm size)
prettier --check on all modified files
Playwright E2E suite __e2e__/basics.test.ts: 52 passed
Targeted source and built dist Vitest suites (i18n, translations, translations-fs, translations-ec, config-errors, starlight-page-route-data): 84 passed in both source and dist modes
axe-playwright audit (wcag2a, wcag21a, wcag2aa, wcag21aa, wcag22aa, best-practice) on built /headings-banner/, /custom-page/, and /headings/ pages: 0 violations
Hello! Thank you for opening your first PR to Starlight! ✨
Here’s what will happen next:
Our GitHub bots will run to check your changes.
If they spot any issues you will see some error messages on this PR.
Don’t hesitate to ask any questions if you’re not sure what these mean!
In a few minutes, you’ll be able to see a preview of your changes on Netlify 🤩
One or more of our maintainers will take a look and may ask you to make changes.
We try to be responsive, but don’t worry if this takes a few days.
This branch has not been deployed
No deployments
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
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.
Description
<Banner />out of<main>inPage.astroso it sits above<TwoColumnContent />inside.main-frame. On wide viewports (>= 72rem) with a table of contents, the banner now spans the full width of the content area (both.main-paneand.right-sidebar-container) and appears centered instead of being constrained to.main-pane..right-sidebarsticky positioning inTwoColumnContent.astro(top: var(--sl-nav-height),height: calc(100vh - var(--sl-nav-height)), border moved onto.right-sidebar) so the right sidebar starts below the banner at scroll top and pins beneath the navbar when scrolling.role="region"and a localizedaria-label(banner.accessibleLabel, seeded in built-in translation files sincebuiltinI18nSchema()requires all keys) toBanner.astroso the banner remains a unique accessible landmark outside<main>.starlight-toc.tsto continue observing.sl-bannernow that it is no longer a descendant of<main>.packages/starlight/__e2e__/basics.test.ts, plus an@astrojs/starlightpatch changeset.Local verification after final edits:
pnpm --filter '@astrojs/*' build)size-limitcheck (pnpm --filter @example/starlight-basics buildandpnpm size)prettier --checkon all modified files__e2e__/basics.test.ts:52 passeddistVitest suites (i18n,translations,translations-fs,translations-ec,config-errors,starlight-page-route-data):84 passedin both source anddistmodesaxe-playwrightaudit (wcag2a,wcag21a,wcag2aa,wcag21aa,wcag22aa,best-practice) on built/headings-banner/,/custom-page/, and/headings/pages:0violations