rstudio / rstudio/bslib

page_navbar() pages are missing banner and main landmarks

Open
#1,356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
569
Forks
72
Avg merge
1d 2h
Merged PRs (30d)
5

Description

Problem

Pages built with page_navbar() (and thus shiny::navbarPage()) don't expose the HTML landmark regions that screen reader users rely on for page navigation:

  • The top navigation bar is the page's visual header, but it is only a bare <nav> — there is no <header> (banner) landmark.
  • When no sidebar is provided, the content area renders as a plain <div class="container-fluid"> — there is no <main> landmark. (Pages with a sidebar do get one, via page_main_container().)

What a screen reader landmark rotor shows today

For page_navbar(title = "My App", nav_panel("One", ...)):

  • navigation — and nothing else. No banner, no main, so there is no landmark route to the page's content.

Expected

  • banner: <header> wrapping the navbar
  • navigation: <nav> (already present)
  • main: <main> for the content area

Note: any fix should live in page_navbar() rather than the shared navs_bar_()/navbarPage_(), since navset_bar() can be embedded anywhere on a page, where page-level landmarks would be inappropriate (only one visible <main> per page, and a banner must not be nested in sectioning content).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at page_navbar() and compare its no-sidebar and sidebar content paths, while checking how navs_bar_() and navbarPage_() are used without moving page-level semantics there. Done means page_navbar() exposes header, navigation, and main landmarks, while embedded navset_bar() behavior remains appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
accessibility
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.