Skip to content

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

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

Fix accessibility issue on Show Pages: improve breadcrumb and thumbna…#3059
trmccormick wants to merge 3 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   15m 25s ⏱️ +31s
2 463 tests +95  2 404 ✅ +92  59 💤 +3  0 ❌ ±0 
2 490 runs  +95  2 429 ✅ +92  61 💤 +3  0 ❌ ±0 

Results for commit 3c1d07a. ± Comparison against base commit 1c32a79.

This pull request removes 49 and adds 144 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 8100725a-1d90-4557-864c-00409f795497
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit fd86351f-dc4e-4c3a-8435-c245ad617cdb
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read e23e9d2f-3435-4d94-823d-2e3f90f17ad6
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 75e7b83b-e47a-4c66-960a-fa4fc14ab250
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy d9472acf-e82f-4952-8396-d1a5041bf171
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 87bfed59-91cb-4fdf-bfb5-f0d3f548d002
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read da3bb459-b3b7-4243-953f-7f91130faebe
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 9f407e42-6854-45b9-bfaf-f705bf65954a
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 4d5df7e4-91b5-410b-a729-acdc94230afc
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 41e5e0d2-e785-4c87-87e3-5e7bfcf965a4
…

♻️ 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.

…l.erb to hyku.scss

- Remove breadcrumb/document-title link color overrides from tenant customization file (_appearance_styles.html.erb)
- Add same rules to static CSS (hyku.scss) for WCAG AA compliance across all tenants
- Addresses reviewer feedback that appearance styles shouldn't contain site-wide accessibility fixes
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