From 632424d2ea4fdc8971f84f22ecef8a61a0a74a60 Mon Sep 17 00:00:00 2001 From: Charlotte Wickham Date: Wed, 26 Aug 2026 10:26:54 -0700 Subject: [PATCH] Give every website and book nav landmark a distinct, localizable label (#14376) New language keys navigation-{main,section,secondary,page,breadcrumbs}-label label the navbar, sidebar (adaptive), secondary nav, prev/next page nav, and breadcrumbs; the TOC nav is labelled by its localized heading via aria-labelledby (html + revealjs). Defaults omit the word "navigation" per the APG landmark-regions practice, since screen readers announce the role after the label. Note: all-schema-definitions.json also picks up the lagged cache-globals schema from #14735 (regenerated artifacts trail schema changes by one build). --- news/changelog-1.11.md | 5 +++ src/config/constants.ts | 11 ++++++ src/config/types.ts | 10 ++++++ .../types/website/website-navigation.ts | 15 ++++++-- src/resources/editor/tools/vs-code.mjs | 11 ++++-- .../tools/yaml/all-schema-definitions.json | 2 +- src/resources/editor/tools/yaml/web-worker.js | 11 ++++-- .../yaml/yaml-intelligence-resources.json | 11 ++++-- src/resources/formats/html/pandoc/toc.html | 2 +- .../formats/revealjs/pandoc/toc-slide.html | 2 +- src/resources/language/_language.yml | 8 +++++ .../templates/nav-after-body-postamble.ejs | 2 +- .../website/templates/nav-before-body.ejs | 4 +-- .../projects/website/templates/sidebar.ejs | 2 +- src/resources/schema/definitions.yml | 5 +++ src/resources/schema/json-schemas.json | 15 ++++++++ src/resources/types/schema-types.ts | 5 +++ src/resources/types/zod/schema-types.ts | 5 +++ .../smoke-all/accessibility/toc-nav-label.qmd | 34 +++++++++++++++++++ .../website/nav-landmark-labels/.gitignore | 3 ++ .../website/nav-landmark-labels/_quarto.yml | 23 +++++++++++++ .../nav-landmark-labels/guide/advanced.qmd | 5 +++ .../nav-landmark-labels/guide/intro.qmd | 19 +++++++++++ .../website/nav-landmark-labels/index.qmd | 22 ++++++++++++ .../website/nav-landmark-labels/no-navbar.qmd | 15 ++++++++ .../website/nav-landmark-labels/override.qmd | 23 +++++++++++++ 26 files changed, 251 insertions(+), 19 deletions(-) create mode 100644 tests/docs/smoke-all/accessibility/toc-nav-label.qmd create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/.gitignore create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/_quarto.yml create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/guide/advanced.qmd create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/guide/intro.qmd create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/index.qmd create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/no-navbar.qmd create mode 100644 tests/docs/smoke-all/website/nav-landmark-labels/override.qmd diff --git a/news/changelog-1.11.md b/news/changelog-1.11.md index 35f6ee3a280..dac14c8ba01 100644 --- a/news/changelog-1.11.md +++ b/news/changelog-1.11.md @@ -1,5 +1,10 @@ All changes included in 1.11: +## Accessibility + +- ([#14376](https://github.com/quarto-dev/quarto-cli/issues/14376)): Add a distinct, localizable `aria-label` to each navigation landmark of websites and books: the navbar, the sidebar, the mobile secondary nav, the previous/next page navigation, and the breadcrumbs (previously hardcoded English `breadcrumb`). The new `navigation-*-label` language keys can be overridden with `language:` metadata. +- ([#14376](https://github.com/quarto-dev/quarto-cli/issues/14376)): Label the table of contents `