From 0cda4db6dd506e8afd1b6eb24051ead999a94ca8 Mon Sep 17 00:00:00 2001 From: charliejhadley Date: Mon, 22 Jun 2026 14:18:31 +0100 Subject: [PATCH 1/3] Improve colour contrast --- inst/BS5/assets/pkgdown.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/BS5/assets/pkgdown.scss b/inst/BS5/assets/pkgdown.scss index 8d3db061b..ef5f8b1a9 100644 --- a/inst/BS5/assets/pkgdown.scss +++ b/inst/BS5/assets/pkgdown.scss @@ -65,7 +65,7 @@ $pkgdown-navbar-bg-dark: if($navbar-dark-bg, $navbar-dark-bg, null) !default; } .nav-item.active .nav-link { - background: RGBA(var(--bs-body-color-rgb), 0.1); + background: RGBA(var(--bs-body-color-rgb), 0.18); } .nav-item .nav-link:hover { From 1dee4af7e1f54bfa2def7765876aedc356aa59e8 Mon Sep 17 00:00:00 2001 From: charliejhadley Date: Mon, 22 Jun 2026 14:30:57 +0100 Subject: [PATCH 2/3] Improve colour contrast in search --- inst/BS5/assets/pkgdown.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/BS5/assets/pkgdown.scss b/inst/BS5/assets/pkgdown.scss index ef5f8b1a9..ad733ca54 100644 --- a/inst/BS5/assets/pkgdown.scss +++ b/inst/BS5/assets/pkgdown.scss @@ -741,7 +741,7 @@ mark { line-height: 1.3; &:hover { - background-color: var(--bs-tertiary-bg); + background-color: RGBA(var(--bs-primary-rgb), 0.15); color: var(--bs-body-color); } From 59637d7c243e18865f130606057d7367957853d4 Mon Sep 17 00:00:00 2001 From: charliejhadley Date: Mon, 22 Jun 2026 14:34:26 +0100 Subject: [PATCH 3/3] Update news with accessibility improvement --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index bb0b748e5..5f2925dd6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,8 @@ * When previewing a site, it is now served via a local http server. This enables dynamic features such as search to work correctly (@shikokuchuo, #2975). * Code in a link (href) is no longer autolinked (#2972) +* improve accessibility of navbar and search through increased contrast ratio of colours (#2999) + # pkgdown 2.2.0 * Make `build_llm_docs()` more robust to the use of old Pandoc (@nanxstats, @galachad, #2952, #2954)