Skip to content

[Bug]: Matching characters in search results disappear when using High Contrast Mode (hcm) #30218

@TGiles

Description

@TGiles

Describe the bug

When in Windows High Contrast Mode, matching characters in the search results disappear into the background. Screenshot showing the issue at hand

Reproduction link

https://github.com/TGiles/storybook-test

Reproduction steps

  1. Given a new Storybook instance that was created via npx storybook@next init, see my storybook-test repo for this new instance and running either Windows 10 or Windows 11
  2. Enable High Contrast Mode
  3. Serve new Storybook instance locally
  4. Use the search bar and type in the character "d"

Expected Results:

  • The "d" in Docs is highlighted or marked in some way that indicates a match to the search query

Actual Results:

  • The "d" in Docs is set to the background/canvas color and becomes invisible.

System

Storybook Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (24) x64 AMD Ryzen 9 9900X 12-Core Processor
  Binaries:
    Node: 22.13.0 - C:\nvm4w\nodejs\node.EXE
    Yarn: 1.22.22 - C:\nvm4w\nodejs\yarn.CMD
    npm: 10.9.2 - C:\nvm4w\nodejs\npm.CMD <----- active
  Browsers:
    Chrome: 131.0.6778.206
    Edge: Chromium (127.0.2651.98)
  npmPackages:
    @storybook/addon-essentials: ^8.5.0-beta.8 => 8.5.0-beta.8
    @storybook/blocks: ^8.5.0-beta.8 => 8.5.0-beta.8
    @storybook/test: ^8.5.0-beta.8 => 8.5.0-beta.8
    @storybook/web-components: ^8.5.0-beta.8 => 8.5.0-beta.8
    @storybook/web-components-vite: ^8.5.0-beta.8 => 8.5.0-beta.8
    chromatic: ^11.22.1 => 11.22.1
    storybook: ^8.5.0-beta.8 => 8.5.0-beta.8

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions