Skip to content

fix: improve search input text contrast accessibility#1974

Merged
kartykp merged 2 commits into
mainfrom
kartykp/fix-search-input-text-contrast
May 29, 2026
Merged

fix: improve search input text contrast accessibility#1974
kartykp merged 2 commits into
mainfrom
kartykp/fix-search-input-text-contrast

Conversation

@kartykp
Copy link
Copy Markdown
Contributor

@kartykp kartykp commented May 29, 2026

Summary

  • Fix search input text visibility by replacing hardcoded low-contrast input text color with Primer foreground tokens and fallbacks in src/components/text-input.js
  • Ensure caret visibility by setting caret-color to the same accessible foreground token
  • Improve placeholder readability with muted foreground token fallback and remove opacity fade
  • Include required docs formatting update from CI in content/cli/v11/commands/npm-stage.mdx (Prettier only)

Why

  • Typed text in the search box could be effectively invisible on light backgrounds, causing an accessibility issue.

Validation

  • npx eslint src/components/text-input.js
  • npx prettier --check content/cli/v11/commands/npm-stage.mdx

@kartykp kartykp self-assigned this May 29, 2026
@kartykp kartykp requested review from a team and leobalter as code owners May 29, 2026 17:21
@natalejoe
Copy link
Copy Markdown

Summary

  • Fix search input text visibility by replacing hardcoded low-contrast input text color with Primer foreground tokens and fallbacks in src/components/text-input.js
  • Ensure caret visibility by setting caret-color to the same accessible foreground token
  • Improve placeholder readability with muted foreground token fallback and remove opacity fade
  • Include required docs formatting update from CI in content/cli/v11/commands/npm-stage.mdx (Prettier only)

Why

  • Typed text in the search cc7a70bd976c5662aa1ca50a6e212c637741e46bcc7a70bd976c5662aa1ca50a6e212c637741e46b could be effectively invisible on light backgrounds, causing an accessibility issue.

Validation

  • npx eslint src/components/text-input.js
  • npx prettier --check content/cli/v11/commands/npm-stage.mdx

@kartykp kartykp merged commit 97e7358 into main May 29, 2026
9 checks passed
@kartykp kartykp deleted the kartykp/fix-search-input-text-contrast branch May 29, 2026 17:46
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.

3 participants