Skip to content

Fix: Checkbox icon color in AI settings page - #1183

Merged
dkotter merged 1 commit into
WordPress:developfrom
SainathPoojary:fix/ai-settings-checkbox-color
Oct 14, 2026
Merged

dkotter merged 1 commit into
WordPress:developfrom
SainathPoojary:fix/ai-settings-checkbox-color

Conversation

@SainathPoojary

@SainathPoojary SainathPoojary commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What?

Ensures the checkbox checkmark and indeterminate icons are styled with color: #fff on the AI settings page (/wp-admin/options-general.php?page=ai-wp-admin).

Why?

Currently on the AI settings page, checkboxes render with a black/dark checkmark on top of the blue checkbox background.

This appears to be caused by a styling compatibility gap with upstream icon changes:

  • In Gutenberg PR #78812, icons like check and reset were redrawn to be stroke-based, and CheckboxControl styling was updated from fill: $white to color: $white.
  • The AI settings page uses @wordpress/dataviews (bumped to 19.0.0 in Fix: Accordion toggles in the Connectors > AI plugin page miss a focus style #1035), which bundles this newer icon.
  • However, the active WordPress Core wp-components stylesheet loaded by the admin page still styles checkbox icons using fill: #fff.
  • Because the stroke icon relies on CSS color rather than fill, it defaults to inheriting the page's text color (black).

How?

Adds a scoped compatibility rule inside .ai-settings-page in routes/ai-home/style.scss:

  1. Sets color: #fff on svg.components-checkbox-control__checked and svg.components-checkbox-control__indeterminate.
  2. Preserves disabled styling by setting color: var(--wpds-color-foreground-interactive-neutral-disabled, #8d8d8d) on .components-checkbox-control:has(:disabled).

Use of AI Tools

AI assistance: Yes
Tool(s): Antigravity
Used for: Investigating and drafting the PR description were assisted by AI. Implementation review, testing, and verification were performed manually.

Testing Instructions

  1. Navigate to Settings > AI (/wp-admin/options-general.php?page=ai-wp-admin).
  2. Toggle any checkbox in the feature settings (such as Comment Moderation > Allow Guest Comments).
  3. Confirm that the checkmark inside the blue box is now white instead of black.

Screenshots

Before After
image image

Changelog Entry

Fixed - Checkbox icon color on the AI settings page.

Open WordPress Playground Preview

@SainathPoojary
SainathPoojary requested a review from a team October 14, 2026 16:18
@github-actions

github-actions Bot commented Oct 14, 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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SainathPoojary <sainathpoojary@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

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

@dkotter dkotter added this to the 1.5.0 milestone Oct 14, 2026
@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.23%. Comparing base (26322c3) to head (3253d05).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #1183      +/-   ##
=============================================
+ Coverage      82.17%   82.23%   +0.05%     
- Complexity      3399     3400       +1     
=============================================
  Files            136      136              
  Lines          13187    13210      +23     
=============================================
+ Hits           10837    10863      +26     
+ Misses          2350     2347       -3     
Flag Coverage Δ
unit 82.23% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter

dkotter commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@SainathPoojary I'm not able to reproduce this myself, are there some setup instructions I need to follow here?

I'm running WordPress 7.2-alpha-64337 and the checkbox looks correct to me. Is the issue here reliant on having Gutenberg installed and certain experiments enabled there?

@SainathPoojary

Copy link
Copy Markdown
Member Author

Thanks for testing, @dkotter!

Gutenberg is not installed here. The issue happens on a standard setup with just the AI plugin active.

The difference seems to be the WordPress version:

  • On WordPress 7.2-alpha-63166-src, WordPress Core already includes the updated stylesheet, so it looks correct there.
  • On WordPress 7.1.3 (latest stable version), Core still uses the older stylesheet with fill instead of color.

Because the plugin supports WordPress 7.0.3 and above, users on 7.0.x and 7.1.x see the dark checkmark when using the newer icon bundled in @wordpress/dataviews.

You can reproduce it by testing on WordPress 7.1.3 through the default wp-env setup.

Since 7.2-alpha-63166-src already resolves this upstream in Core, this rule acts as a backward compat for supported 7.0.x–7.1.x versions. Let me know your thoughts.

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

Thanks for the fix! Verified the issue exists on WP 7.1 and below and the code here does fix it. The issue doesn't exist on WP 7.2 but the code here doesn't cause any additional problems so looks good to me

@dkotter
dkotter merged commit 03a66dc into WordPress:develop Oct 14, 2026
36 checks passed
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.

2 participants