Skip to content

Fix WCAG 2.2 AA text contrast failures in app stylesheet (#2185) - #2190

Open
jay23606 wants to merge 1 commit into
TexasDigitalLibrary:mainfrom
jay23606:pr-go-simple/2185
Open

jay23606 wants to merge 1 commit into
TexasDigitalLibrary:mainfrom
jay23606:pr-go-simple/2185

Conversation

@jay23606

Copy link
Copy Markdown

Fixes #2185.

The issue cites 4.51:1, which appears to be a typo for the WCAG 1.4.3 minimum of 4.5:1. I computed contrast ratios for the hardcoded colors in src/main/webapp/app/resources/styles/sass/app.scss against the backgrounds they render on and changed only the text colors that failed.

Changes (all in app.scss):

  • .btn-warning (and its hover/focus/active states): white text on #F8CF66 / #F6BF33 (1.5:1 / 1.7:1) -> #333333 (8.5:1 / 7.5:1)
  • .hint: #999999 (2.85:1 on white) -> #666666 (5.7:1)
  • sidebox .sidebox-heading: #cccccc (1.6:1) -> #666666 (5.7:1). The [+]/[-] indicator inherits this color.
  • legend.legendborder: #999999 (2.85:1) -> #70706f (5.0:1), the color already used by .legendborder
  • .footer: Exceptions while updating field profiles #777 (4.1:1 on #f5f5f5) -> #666666 (5.3:1)
  • .accordion-order-box (and hover chevrons): #afafaf (2.2:1) -> #666666 (5.7:1)
  • .displayed-column: #468847 (3.6:1 on #dff0d8) -> #2d5a2d (6.7:1)
  • .column-placeholder: #c09853 (2.5:1 on #fcf8e3) -> #7a5d2e (5.7:1)
  • .upload-drop-zone.reject (text and ban icon): #d9534f (3.0:1 on #f3d9d9) -> #8a3634 (5.9:1)

Not changed: disabled controls (.add-file-section .disabled glyphicon, #ababab), which WCAG exempts from contrast requirements, and the fieldset border (#999999), which is a non-text 3:1 case rather than the 4.5:1 text case. Those can be a follow-up if ANDI/WAVE still flags them.

Tests: no regression test added. The stylesheet has no unit tests and the Karma suite does not load compiled CSS, so a test would have to grep the SCSS, which is brittle. Verification is by contrast calculation and by reviewing the diff, which contains only color value changes.

🤖 Generated with Claude Code

Tests not run here: npm run build (wvr build: compiles the SASS) - not run because dependencies are not installed and the task forbids installing them; the edits only replace color values, so SASS syntax is unchanged, npm run test:ci (Karma/Jasmine) - not run for the same reason; the suite does not exercise stylesheet colors, Visual check in browser with WAVE/ANDI - not run; no running app available in this environment

Fixes #2185

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@jay23606
jay23606 marked this pull request as ready for review November 19, 2026 15:02
Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WCAG 2.2 AA Contrast of 4.51:1 not met in many places

2 participants