Skip to content

Privacy: Fix the color contrast of request row action text - #12842

Open
jigneshbhavani wants to merge 1 commit into
WordPress:trunkfrom
jigneshbhavani:fix/65807-privacy-table-contrast
Open

Privacy: Fix the color contrast of request row action text#12842
jigneshbhavani wants to merge 1 commit into
WordPress:trunkfrom
jigneshbhavani:fix/65807-privacy-table-contrast

Conversation

@jigneshbhavani

Copy link
Copy Markdown

The Export and Erase Personal Data tables render their progress and result text inside the row actions, where forms.css sets a privacy specific color:

.privacy_requests .row-actions {
	color: #787c82;
}

Against the #fff cell background that is 4.19:1, below the 4.5:1 minimum for normal text. The strings are built into $row_actions in the two list tables, so they inherit a color meant for links:

'<span class="remove-personal-data-processing hidden">' . __( 'Erasing data...' ) . ' <span class="erasure-progress"></span></span>' .
'<span class="remove-personal-data-success hidden">' . __( 'Erasure completed.' ) . '</span>' .

This removes the override so the text inherits the standard .row-actions color, #646970 from list-tables.css, which is 5.53:1 against the same background. Every other list table in the admin already uses it, so this introduces no new color, which is what the ticket asks for.

The color was never chosen for its contrast. It arrived as #72777c in [46264] and became #787c82 in [50025], when admin colors were standardized on a single palette.

Measured, before and after

Computed styles on the rendered screens at /wp-admin/export-personal-data.php and /wp-admin/erase-personal-data.php, with requests present in all four states (pending, confirmed, failed, completed). The row action states that are hidden until JS runs were unhidden in order to measure them.

String Before After
Downloading data... 4.19:1 5.53:1
Download failed. 4.19:1 5.53:1
Erasing data... 4.19:1 5.53:1
Erasure completed. 4.19:1 5.53:1
Force erasure has failed. 4.19:1 5.53:1
Separator between actions 4.19:1 5.53:1

Auditing every text bearing element inside both tables: 7 failures before, 0 after. The lowest remaining ratio in either table is 4.73:1, the #d63638 "Failed" status label, which passes.

Note the ticket names two strings; there are five. "Force erasure has failed." and "Download failed." come from the same rule, as do the | separators.

On the striping question

The ticket asks whether zebra striping puts this text on a gray background, which would lower the ratio further. It does not. The table carries the striped class, but forms.css overrides the backgrounds, and measured on the rendered page every text bearing cell computes to #fff in all four request states. The only gray is #f6f7f7 on td.check-column of a failed request, which contains just the checkbox and no text. So 4.19:1 was the worst case, not the best case.

Testing

  • Measured computed color and effective background for every text bearing element in both tables, in all four request states, before and after.
  • No RTL change is needed: forms-rtl.css is generated at build time and is not tracked.
  • CSS only, no markup or PHP change, so no unit test accompanies this.

Trac ticket: https://core.trac.wordpress.org/ticket/65807

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Drafting the patch and this description. I measured the contrast ratios from computed styles on the rendered admin screens before and after the change, created privacy requests in all four states to cover every row variant, audited every text bearing element in both tables rather than only the strings named in the ticket, checked the striping question against the rendered page, traced the color back through [46264] and [50025], and I take responsibility for the result.

The Export and Erase Personal Data tables render progress and result text inside
the row actions, where `.privacy_requests .row-actions` set the color to #787c82.
Against the #fff cell background that is 4.19:1, below the 4.5:1 minimum for
normal text. The affected strings are "Downloading data...", "Download failed.",
"Erasing data...", "Erasure completed." and "Force erasure has failed.", along
with the separators between the actions.

The override is not needed. Every other list table in the admin uses the standard
`.row-actions` color, #646970, which is 5.53:1 against the same background.
Removing the privacy specific rule brings these two tables in line with the rest
of the admin without introducing another color.

The color was never chosen for its contrast. It arrived as #72777c in [46264] and
became #787c82 in [50025], when admin colors were standardized on a single
palette.

Props bejignesh, afercia, joedolson.
Fixes #65807.
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props bejignesh.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

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.

1 participant