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 438c5b9
Browse filesBrowse the repository at this point in the historyBrowse files
Use one focus ring for all focusable elements in Bootstrap HTML (#15163)
Quarto's HTML output used four different keyboard focus indicators.
Two of them fail the 3:1 contrast minimum of WCAG 1.4.11, and in
forced-colors mode some controls had no indicator at all. One
two-tone ring, defined in a single rule, now covers every focusable
element. It follows W3C technique C40: a 2px outline in the outer
tone, with the inner tone as a box-shadow filling a 2px offset.
The tones follow the page. The dark tone is outer on light pages and
the white tone is outer on dark pages, so the outer ring always
contrasts with the background. The derived pair is darkened to at
least 9:1 contrast, so one tone has at least 3:1 against any solid
background.
- Sass variables $focus-ring-outer-color and $focus-ring-inner-color
set the tones. An explicit outer color is used as given.
- $focus-ring-outline-width and $focus-ring-outline-offset are public
and default to 2px. Scroll containers get padding so a larger ring
is not clipped.
- Bootstrap's focus halos are turned off at the source, and the
variables that set them are no longer used by Quarto.
- Author rules win over the ring. The global rule is (0,1,0), and
--quarto-focus-ring-shadow removes the inner tone.
- Bootstrap controls that remove their outline at (0,2,0) get the
ring back, and MathJax's runtime outline: none is overridden at
(0,2,1).
- The search box draws the ring on its form, and pagination gets a
(0,4,0) rule for themes that replace its box-shadow.
- Per-control focus rules are removed, including the outline: revert
from #14785. The skip link (#14685) loses its drop shadow and takes
the standard ring.
- accessibleContrast() takes a numeric ratio, and "A" now means 3:1.
Supersedes #14867Fixes#15139
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
@@ -25,6 +25,7 @@ All changes included in 1.11:
25
25
- ([#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-role-mismatch`).
26
26
- ([#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 they are keyboard accessible and properly announced.
27
27
- ([#14774](https://github.com/quarto-dev/quarto-cli/issues/14774)): Fix missing keyboard focus indicator on the code tools button and on a website's sidebar toggle and sidebar search buttons.
28
+
- ([#15139](https://github.com/quarto-dev/quarto-cli/issues/15139)): HTML output now uses one high-contrast keyboard focus ring for all focusable elements, which stays visible in forced-colors mode. Set its colors with the new `$focus-ring-outer-color` and `$focus-ring-inner-color` Sass variables, and its size with `$focus-ring-outline-width` and `$focus-ring-outline-offset`. Quarto no longer uses Bootstrap's `$focus-ring-color`, `$focus-ring-box-shadow`, `$btn-focus-width`, and `$btn-focus-box-shadow`.
28
29
- ([#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 (`Site`), the sidebar (`Section`, or `Site` when there is no navbar), the narrow-viewport toolbar (`Toolbar`), the previous/next page navigation (`Page`), and the breadcrumbs (`Breadcrumbs`) (previously hardcoded English `breadcrumb`). The new `navigation-*-label` language keys can be overridden with `language:` metadata.
29
30
- ([#14376](https://github.com/quarto-dev/quarto-cli/issues/14376)): Translate the new `navigation-*-label` keys in all 33 built-in language files. The values are drawn from existing human-translated interface strings (LibreOffice, GNOME, Wikidata) and each one carries a comment naming its source; values that were adapted rather than used verbatim are marked `needs review`.
30
31
- ([#14376](https://github.com/quarto-dev/quarto-cli/issues/14376)): Label the table of contents `<nav>` with its localized title (`aria-labelledby`), in `html` and `revealjs` output, so assistive technology can tell it apart from other navigation landmarks.
0 commit comments