Skip to content

Conversation

jpg619
Copy link
Contributor

@jpg619 jpg619 commented Sep 17, 2025

Add focus-visible styles to clipboard copy button for improved accessibility

  • Files Changed
    code.js

  • Summary
    This change adds proper focus-visible styling to the clipboard copy button, providing a clear visual indicator when users navigate to the button using keyboard controls while maintaining system-consistent focus ring colors for better accessibility compliance.

BEFORE

image

AFTER

image

sx={{
'&:focus-visible': {
outline: '2px solid',
outlineColor: '-webkit-focus-ring-color',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using -webkit-focus-ring-color ensures the focus indicator matches what users expect from their operating system

@jpg619 jpg619 changed the title [Fix Accessibility Bug] Add focus-visible styles to Clipboard Copy button [Fix Accessibility] improve accessibility of syntax highlighting by adding string token color Sep 17, 2025
@jpg619 jpg619 changed the title [Fix Accessibility] improve accessibility of syntax highlighting by adding string token color [Fix Accessibility] Add focus-visible styles to Clipboard Copy button Sep 17, 2025
@jpg619 jpg619 marked this pull request as ready for review September 17, 2025 21:16
@jpg619 jpg619 requested review from leobalter and a team as code owners September 17, 2025 21:16
@jpg619 jpg619 requested review from wraithgar and removed request for a team and leobalter September 17, 2025 21:16
@jpg619 jpg619 self-assigned this Sep 18, 2025
@jpg619 jpg619 requested a review from owlstronaut September 18, 2025 16:06
@jpg619 jpg619 merged commit 395867f into main Sep 22, 2025
9 checks passed
@jpg619 jpg619 deleted the jpg619/fix-accessibility-clipboard-focus branch September 22, 2025 17:45
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