Skip to content

Conversation

dchyun
Copy link
Contributor

@dchyun dchyun commented Apr 14, 2025

📌 Summary

If merged, this PR would update the colors of focus rings for interactive elements in the following components, and fix color contrast issues with the existing colors.

🛠️ Detailed description

Currently the CodeBlock, CodeEditor, and SideNav components leverage our existing focus ring color tokens that are used on light colored backgrounds, but these components all have interactive elements on dark colored backgrounds. This was resulting in a color contrast violation as the focus ring colors had contrast less than 3:1.

New dark background focus ring tokens were created in HDS-4640 to fix these issues.

Note: These new token values are being implemented at the component level, not in the tokens package. The organization of global tokens for themes will be implemented in the future, and when that occurs these tokens will be moved from the component level to the global level.

📸 Screenshots

CodeBlock

Before
Screenshot 2025-04-14 at 11 27 03 AM
After
Screenshot 2025-04-14 at 11 27 16 AM

CodeEditor

Before
Screenshot 2025-04-14 at 10 53 15 AM
Screenshot 2025-04-14 at 11 06 19 AM
After
Screenshot 2025-04-14 at 10 52 50 AM
Screenshot 2025-04-14 at 11 06 11 AM

SideNav

Before
Screenshot 2025-04-14 at 11 22 16 AM
Screenshot 2025-04-14 at 11 22 53 AM
Screenshot 2025-04-14 at 11 23 17 AM
After
Screenshot 2025-04-14 at 11 28 30 AM
Screenshot 2025-04-14 at 11 22 40 AM
Screenshot 2025-04-14 at 11 23 08 AM

🔗 External links

Jira ticket: HDS-4767
Figma file: Link


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Apr 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Apr 16, 2025 2:22pm
hds-website ✅ Ready (Inspect) Visit Preview Apr 16, 2025 2:22pm

@dchyun dchyun marked this pull request as ready for review April 14, 2025 18:19
@dchyun dchyun requested a review from a team as a code owner April 14, 2025 18:19
@dchyun dchyun requested a review from a team April 14, 2025 18:19
@KristinLBradley
Copy link
Contributor

@dchyun I would add the specific designer you worked with on this as a reviewer so they can comment on/approve the visual changes you implemented.

Copy link
Contributor

@LilithJames-HDS LilithJames-HDS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks perfect, thank you for writing everything up so clearly!

@dchyun dchyun requested a review from KristinLBradley April 17, 2025 20:00
@KristinLBradley KristinLBradley requested a review from didoo April 17, 2025 20:12
@KristinLBradley
Copy link
Contributor

@dchyun If all the visual diffs in Percy are as expected and the designer has approved the implemented visual changes then you can approve the Percy diffs to clear the failing check.

@dchyun dchyun merged commit 15e016d into main Apr 18, 2025
16 checks passed
@dchyun dchyun deleted the dchyun/focus-tokens-dark branch April 18, 2025 17:16
@hashibot-hds hashibot-hds mentioned this pull request Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants