Conversation
Sidebars now render as a plain div by default instead of an aside, since a sidebar's visual placement doesn't imply its content is complementary to the main content. The new role argument of sidebar() opts into a landmark: "complementary" renders a native aside, while "form", "search", and "region" render a div with the matching ARIA role. Landmark roles require an accessible name, provided by the sidebar title (which is wired up via aria-labelledby) or by an explicit aria-label/aria-labelledby, which always takes precedence. Part of #1358
page_sidebar() now wraps the entire layout_sidebar() in its single <main> element, so sidebar controls and content together form the page's main landmark, instead of only the content area. The page main container helper gains a gap argument shared with the navbar variant, and the page-sidebar min-height/min-width rules are retargeted for the extra <main> wrapper while remaining conditioned on fillable layouts. Part of #1358
gadenbuie
marked this pull request as ready for review
September 21, 2026 15:57
cpsievert
reviewed
Sep 21, 2026
Comment on lines
+212
to
214
| if (is.null(x$open)) { | ||
| x$open <- sidebar_open_on() | ||
| } |
Collaborator
There was a problem hiding this comment.
IIRC, this might close at least one other open issue.
cpsievert
approved these changes
Sep 21, 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.
Fixes #1358
Summary
Sidebars previously used
<aside>markup, so every sidebar became a complementary landmark. Screen reader users heard each dashboard sidebar announced as separate complementary content, even when the sidebar held the controls that drive the page's main output.This PR changes the default sidebar markup to a neutral
<div>. The newroleargument ofsidebar()adds a landmark when the sidebar's content warrants one.sidebar()accepts"form","search","complementary", or"region"."complementary"renders an<aside>; the other roles render a<div>with aroleattribute.Landmark roles need an accessible name.
sidebar()labels the landmark from itstitlewhen one exists, and otherwise requiresaria-labeloraria-labelledby. An unnamed landmark role is a rendering error.page_sidebar()now wraps its sidebar and main content in a single<main>element, so a sidebar withrole = "form"sits inside the page's main landmark. That layout matches the guidance in the issue: dashboard filters are part of the main content, not complementary to it.