Skip to content

Fix contrast issues in the agentic UI - #4199

Merged
katinthehatsite merged 1 commit into
trunkfrom
fix/low-contrast-in-agentic-ui
Jul 15, 2026
Merged

Fix contrast issues in the agentic UI#4199
katinthehatsite merged 1 commit into
trunkfrom
fix/low-contrast-in-agentic-ui

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Related issues

Related to STU-1970

How AI was used in this PR

It was used to audit the contrast issues and raise contrast on problematic items.

Proposed Changes

This PR ensures that we don't have the contrast issues for accessibility reasons in the agentic UI. It fixes the contast on the time displayed in the sidebar for the sessions as well as the low contrast on the site form descriptions:

Before

Screenshot 2026-07-15 at 9 10 46 AM

After

Screenshot 2026-07-15 at 10 23 49 AM

For now, they were no other contrast issues flagged.

Testing Instructions

  • Visually review the changes and confirm they look good

Alternatively:

  • Install axe tools with npm install --save-dev @axe-core/react --workspace=apps/ui
  • Add this code to apps/ui/src/main.tsx:
  import React from 'react';                                                                                                          
  import ReactDOM from 'react-dom';                                                                                                   
                                                                                                                                      
  if ( import.meta.env.DEV ) {                              
      void import( '@axe-core/react' ).then( ( axe ) => {                                                                             
          void axe.default( React, ReactDOM, 1000 );                                                                                  
      } );
  } 
  • Start Studio with npm start
  • Enable the Agentic UI feature flag from Studio -> Feature flags from the topbar
  • Click on the New site -> Create new option
  • Open the dev tools
  • Run this bit in the console:
axe.run().then(results => console.table(results.violations.flatMap(v =>
v.nodes.map(n => ({ rule: v.id, impact: v.impact, element: n.html, message:
n.failureSummary })))))   
  • Confirm there are no issues regarding the contrast in the site form in the console
  • Close the add site form and start a chat
  • Confirm that there are no contrast issues related to the duration of the chat session in the console

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
Comment thread apps/ui/src/index.css
foreground so they match the surrounding UI in both schemes. */
.components-base-control__help,
[class*='dataforms-layouts'] [class*='description'] {
color: var( --wpds-color-fg-content-neutral-weak ) !important;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried to avoid using !important but was not able to get around it to solve the contrast issues. Open to suggestions if anyone has alternatives to offer

@katinthehatsite
katinthehatsite requested a review from a team July 15, 2026 08:35
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 3043877 vs trunk

app-size

Metric trunk 3043877 Diff Change
App Size (Mac) 1350.65 MB 1350.64 MB 0.01 MB ⚪ 0.0%

site-editor

Metric trunk 3043877 Diff Change
load 1034 ms 1087 ms +53 ms 🔴 5.1%

site-startup

Metric trunk 3043877 Diff Change
siteCreation 6997 ms 7022 ms +25 ms ⚪ 0.0%
siteStartup 2402 ms 2381 ms 21 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@bcotrim bcotrim 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.

LGTM 👍

@katinthehatsite
katinthehatsite merged commit 8b326ca into trunk Jul 15, 2026
15 checks passed
@katinthehatsite
katinthehatsite deleted the fix/low-contrast-in-agentic-ui branch July 15, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants