-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
UI: Fix search highlight visibility in High Contrast Mode #33427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
Fixes storybookjs#30218 Added a media query for `forced-colors: active` to the `Mark` component. This ensures that matching characters in search results use the system's `Highlight` and `HighlightText` colors instead of disappearing when High Contrast Mode is enabled.
📝 WalkthroughWalkthroughA CSS media query for forced-colors mode is added to the Mark component in SearchResults, adapting text color to HighlightText and background to Highlight for high-contrast accessibility support. No functional or behavioral changes introduced. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (5)**/*.{js,jsx,ts,tsx,json,md,html,css,scss}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{js,jsx,json,html,ts,tsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
code/{core,lib,addons,builders,frameworks,presets}/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (1)📓 Common learnings⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sidnioulz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Linux Chrome with forced colour rendering mode, looks much better. As we're using the appropriate system colours, I'm confident the fix will also work on Windows HCM.
Thanks @Maelryn!
|
View your CI Pipeline Execution ↗ for commit 350a514 ☁️ Nx Cloud last updated this comment at |
|
Thanks @Sidnioulz for the review and for testing this on Linux! I'm glad it works well Let me know if I need to do anything on my end! |
Closes #30218
What I did
I added a media query for
forced-colors: activeto theMarkcomponent inSearchResults.tsx.This ensures that highlighted search terms use the system's
HighlightandHighlightTextcolors, making them visible when Windows High Contrast Mode is enabled.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
forced-colors: activein Chrome DevTools > Rendering).Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.