Repository navigation
Commit 5f85ecc
authored
Give every website and book
Website and book pages emit up to six <nav> landmarks. Before this
change, only the breadcrumbs had a label, and it was hardcoded English
("breadcrumb"). Assistive technology listed the rest as identical
"navigation" entries, and axe flagged the pages under landmark-unique.
Each landmark now gets a distinct label from a new set of language
keys, all nouns so they hold up under translation (bare adjectives like
"Main" don't survive into languages where the word is a bound prefix or
needs to agree with a noun):
- Navbar: navigation-site-label ("Site")
- Sidebar: adaptive — "Site" with no navbar, navigation-section-label
("Section") when a navbar is also present
- Mobile nav strip: navigation-toolbar-label ("Toolbar")
- Previous/next page nav: navigation-page-label ("Page")
- Breadcrumbs (both copies): navigation-breadcrumbs-label
("Breadcrumbs")
- Table of contents (html and revealjs): aria-labelledby pointing at
its existing localized heading, no new key
All keys are overridable per-document or site-wide via `language:`
metadata, and translated across all 33 bundled language files.
Verified axe landmark-unique passes across navbar/sidebar/book
combinations and viewport sizes, and confirmed with the VoiceOver
landmark rotor that each landmark announces a distinct name.
Fixes #14376.nav landmark a distinct, localizable label (#14813)1 parent f0eba45 commit 5f85ecc
60 files changed
Lines changed: 633 additions & 19 deletions
File tree
- news
- src
- config
- project/types/website
- resources
- editor/tools
- yaml
- formats
- html/pandoc
- revealjs/pandoc
- language
- projects/website/templates
- schema
- types
- zod
- tests/docs/smoke-all
- accessibility
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
308 | 314 | | |
309 | 315 | | |
310 | 316 | | |
| |||
434 | 440 | | |
435 | 441 | | |
436 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
703 | 708 | | |
704 | 709 | | |
705 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
706 | 716 | | |
707 | 717 | | |
708 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
472 | 473 | | |
473 | 474 | | |
474 | 475 | | |
475 | | - | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
| 510 | + | |
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
| |||
907 | 909 | | |
908 | 910 | | |
909 | 911 | | |
910 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
911 | 917 | | |
912 | 918 | | |
913 | 919 | | |
| |||
916 | 922 | | |
917 | 923 | | |
918 | 924 | | |
919 | | - | |
| 925 | + | |
920 | 926 | | |
921 | 927 | | |
922 | 928 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10596 | 10596 | | |
10597 | 10597 | | |
10598 | 10598 | | |
| 10599 | + | |
| 10600 | + | |
| 10601 | + | |
| 10602 | + | |
| 10603 | + | |
10599 | 10604 | | |
10600 | 10605 | | |
10601 | 10606 | | |
| |||
25884 | 25889 | | |
25885 | 25890 | | |
25886 | 25891 | | |
25887 | | - | |
| 25892 | + | |
25888 | 25893 | | |
25889 | 25894 | | |
25890 | 25895 | | |
25891 | 25896 | | |
25892 | | - | |
| 25897 | + | |
25893 | 25898 | | |
25894 | 25899 | | |
25895 | 25900 | | |
| |||
25905 | 25910 | | |
25906 | 25911 | | |
25907 | 25912 | | |
25908 | | - | |
| 25913 | + | |
25909 | 25914 | | |
25910 | 25915 | | |
25911 | 25916 | | |
| |||
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3564 | 3564 | | |
3565 | 3565 | | |
3566 | 3566 | | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
3567 | 3572 | | |
3568 | 3573 | | |
3569 | 3574 | | |
| |||
18852 | 18857 | | |
18853 | 18858 | | |
18854 | 18859 | | |
18855 | | - | |
| 18860 | + | |
18856 | 18861 | | |
18857 | 18862 | | |
18858 | 18863 | | |
18859 | 18864 | | |
18860 | | - | |
| 18865 | + | |
18861 | 18866 | | |
18862 | 18867 | | |
18863 | 18868 | | |
| |||
18873 | 18878 | | |
18874 | 18879 | | |
18875 | 18880 | | |
18876 | | - | |
| 18881 | + | |
18877 | 18882 | | |
18878 | 18883 | | |
18879 | 18884 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments