Skip to content

a11y: promote .app-view to the page-level <main> landmark#394

Open
m5x5 wants to merge 3 commits into
SolidOS:milestone3mfrom
m5x5:a11y/page-level-main-landmark
Open

a11y: promote .app-view to the page-level <main> landmark#394
m5x5 wants to merge 3 commits into
SolidOS:milestone3mfrom
m5x5:a11y/page-level-main-landmark

Conversation

@m5x5
Copy link
Copy Markdown

@m5x5 m5x5 commented May 11, 2026

Summary

  • The shell's outer #MainContent wrapper was a <main>, while several panes also rendered their own <main> (profile-pane, solid-ui's tab widget, mainPage). Pages ended up with two or more <main> landmarks, which is invalid per the HTML spec and triggers a11y warnings.
  • This PR promotes the existing .app-view element to <main id="MainContent" class="app-view">, leaving the outer wrapper as a plain <div>. There's now exactly one page-level landmark, scoped to the outline view and global dashboard but excluding the sidebar nav and menu overlay. Same change applied to static/browse.html.
  • Skip-link target #MainContent is preserved.

Addresses SolidOS/profile-pane#310.

Coordinated PRs

Land this one first so the per-pane landmarks can drop their <main> without temporarily leaving pages with zero landmarks.

The shell's outer `#MainContent` wrapper was a <main>, but each pane
also rendered its own <main> (profile-pane, mainPage) or inherited one
from solid-ui's tab widget body. That produced multiple <main>
landmarks per page, which is invalid per HTML semantics and triggers
accessibility warnings.

Promote `.app-view` to <main id="MainContent"> so there is exactly one
page-level landmark, encompassing the outline view and global
dashboard but excluding the application sidebar nav and menu overlay.
The skip-link target `#MainContent` is preserved.

Paired with:
- SolidOS/solid-ui: demote tab-widget body from <main> to <div>
- SolidOS/profile-pane: drop inner <main> from ProfileView/EditProfileView

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
m5x5 and others added 2 commits May 11, 2026 17:02
When the id `MainContent` was moved from the outer wrapper to
`.app-view`, the existing rule `#MainContent { display: flex }`
started applying to the new element, whose children are
`#OutlineView` and `#GlobalDashboard`. Both became row-direction
flex items and `#GlobalDashboard` collapsed to ~36px wide, so
clicking sidebar items ("Your profile" etc.) rendered the pane
content into an invisible column.

Remove `display: flex` from the `#MainContent` rule (the outer
wrapper was the only thing that needed to be a flex container),
add `min-width: 0` so it still cooperates as a flex child of
`.app-shell`, and update the stale `.app-view` comment.

Also strip the redundant `role="main"` from
`static/browse-test.html` to match `browse.html`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@m5x5 m5x5 marked this pull request as ready for review May 11, 2026 15:09
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.

1 participant