Skip to content

Fix accessibility issue on Show Pages: improve breadcrumb and thumbna…#3059

Open
trmccormick wants to merge 2 commits into
mainfrom
fix-accessibility-show-pages
Open

Fix accessibility issue on Show Pages: improve breadcrumb and thumbna…#3059
trmccormick wants to merge 2 commits into
mainfrom
fix-accessibility-show-pages

Conversation

@trmccormick

Copy link
Copy Markdown
Collaborator

Fixes #3054

Improve breadcrumb link contrast on Show Pages

Breadcrumb links on show pages (works, file sets, etc.) were using the tenant-configured link color (#2e74b2) against the Bootstrap breadcrumb background (#e9ecef), resulting in a contrast ratio of 4.16:1 — below the WCAG AA minimum of 4.5:1. This impacts readability for users with color blindness or low vision.

Root cause: The tenant link color is injected via an inline <style> block generated by _appearance_styles.html.erb (body.public-facing a { color: ; }). Because inline styles load after compiled CSS, SCSS-only fixes were overridden by the tenant appearance settings.

Fix: Added nav.breadcrumb a { color: #000000 !important; } at the end of the inline <style> block in _appearance_styles.html.erb, after the dynamic link color rule, ensuring it takes effect regardless of tenant appearance configuration.

Changes:

_appearance_styles.html.erb — Override breadcrumb link color to #000000 for WCAG AA compliance
hyku.scss — Remove earlier ineffective .breadcrumb-item a rule (wrong selector, wrong location)
Verified: Rule confirmed active in browser dev tools with computed color rgb(0, 0, 0) on the breadcrumb links.

@samvera/hyku-code-reviewers

…il title contrast

Change breadcrumb link color to #000000 for better contrast (≥4.5:1).

Resolves issue #3054.
Closes #3054

The tenant-configurable link color (#2e74b2) has insufficient contrast
(4.16:1) against the breadcrumb background (#e9ecef), failing WCAG AA
(4.5:1 minimum).

Override the breadcrumb link color to #000000 in _appearance_styles.html.erb,
after the dynamic link color rule, ensuring the override takes effect
regardless of tenant appearance settings.

Also removes the earlier, incorrect .breadcrumb-item a rule from hyku.scss
which was ineffective since the inline style block loads after application.css.
@trmccormick trmccormick added accessibility minor-ver for release notes patch-ver for release notes and removed minor-ver for release notes labels May 14, 2026
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

Test Results

    3 files  ±0      3 suites  ±0   14m 46s ⏱️ -8s
2 368 tests ±0  2 312 ✅ ±0  56 💤 ±0  0 ❌ ±0 
2 395 runs  ±0  2 337 ✅ ±0  58 💤 ±0  0 ❌ ±0 

Results for commit 705f630. ± Comparison against base commit 1c32a79.

This pull request removes 42 and adds 42 tests. Note that renamed tests count towards both.
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 852718b5-6445-4a0f-b25d-b41b6e07cadc
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 3637d006-47e6-48ad-891f-64848286e9f5
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 75c7939f-e170-48b4-8486-8b4b60a23f7c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update f4f67ada-3bd8-471c-9e6b-c25aaa29173f
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 2f7f615c-adde-478a-9cea-97cc2e2fb550
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 8289f6bd-74e0-4afb-b7dc-a56991de74b9
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 22c2ed04-a252-4d65-8c9d-8e7ed172b0e8
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update d7d025bb-54fe-43a8-98b8-863808f1d94c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 4c0154c1-6da6-4904-ac9c-f63bd0d6d637
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 1b76246e-120e-4a42-8040-63046aef61f0
…
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy b4e47a15-763a-4704-83df-97e87f56c23e
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit be8d1b33-6fee-4ee3-a903-8a5a9fc74ab2
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 526d408d-97e3-4c33-8d4e-72e5ee85f47f
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update f9850b22-c219-4ecc-80af-650618a475f6
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy eecab11c-3d0d-46fd-9e93-8c96980d0e0e
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit b1df6d85-9627-4987-8a04-63fe8ccec13c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 501059be-b1d4-4d3a-a760-87e713ea9a40
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 7b686a46-2db9-4e4f-912a-f5a9cc2ce8ac
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 40c5a482-9df7-46c2-aba6-911d3ba3a611
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit ba5c7da6-6ca0-43d1-81f4-baa968417d35
…

♻️ This comment has been updated with latest results.

@laritakr laritakr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appearance styles doesn't seem the right place for this change. Normally things like this would be in the static css, not in the code that allows a tenant to customize their colors.

If the contrast fix is site-wide, it should probably go into hyku.scss. If it's theme-specific, there are special css files per theme.

If there's a reason it needs to be in the appearance_styles, feel free to offer additional detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure that text and background colors have enough contrast on Show Pages

2 participants