You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a8b5b2b
Browse filesBrowse the repository at this point in the historyBrowse files
Make website sidebar section toggles keyboard-operable buttons (#14826)
* Make website sidebar section toggles keyboard-operable buttons
The expandable sidebar sections were <a> elements with no href, so the
keyboard could not reach them at all, and they carried role="navigation",
which made each one an unnamed nested navigation landmark instead of a
named control.
Sections without their own page now render one <button> that holds both
the label and the chevron, so there is a single tabstop. Sections that do
have a page keep their link and get a <button> chevron beside it, named
after the section. Every disclosed list is named with aria-labelledby
pointing at its own section label.
Also removes the duplicated `role` attribute from the mobile sidebar
toggle in nav-before-body.ejs, which was invalid HTML.
Fixes#12116Fixes#4935
* Use plainText for section-toggle aria-label, ignore rendered fixture output
item.text can carry rendered markup for formatted titles; the aria-label
attribute doesn't parse it, so use item.plainText (falling back to text)
like the pagination labels do. Also cover the sidebar-disclosure fixture's
rendered *.html/*.json/site_libs/ output in .gitignore, matching the
sidebar-content fixture.
---------
Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
Copy file name to clipboardExpand all lines: news/changelog-1.11.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ All changes included in 1.11:
7
7
## Accessibility
8
8
9
9
- ([#14615](https://github.com/quarto-dev/quarto-cli/issues/14615)): Fix invalid `role="menu"` on the website navbar's collapse toggle button, flagged by axe-core (`aria-allowed-role`) and WAVE (`aria_menu_broken`) when the navbar collapses to the hamburger at narrow viewports.
10
+
- ([#12116](https://github.com/quarto-dev/quarto-cli/issues/12116), [#4935](https://github.com/quarto-dev/quarto-cli/issues/4935)): Website sidebar section toggles are now `<button>` elements, so the keyboard can reach them and `Enter` or `Space` can operate them. Each toggle carries `aria-expanded`, and `aria-labelledby` names each disclosed list after its own section. The toggles no longer carry `role="navigation"`, which removed a spurious navigation landmark from every section.
0 commit comments