🎨 Palette: Improve accessibility of Rust playground buttons#124
🎨 Palette: Improve accessibility of Rust playground buttons#124lavkushry wants to merge 1 commit into
Conversation
Added `aria-label` and explicitly styled `:focus-visible` state for the Rust playground "Run" overlay buttons to ensure proper context for screen readers and visibility for keyboard navigation. Additionally, added a new journal entry to `.jules/palette.md` noting the necessity of `aria-label` and `focus-visible` styling for floating link-based overlay buttons. Co-authored-by: lavkushry <106930153+lavkushry@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request improves the accessibility of the Rust Playground "Run" overlay buttons by adding an explicit aria-label attribute in JavaScript, documenting the learning in .jules/palette.md, and defining :focus-visible styles in CSS. Feedback was provided regarding the :focus-visible outline color, which has low contrast against the dark code block background, and a redundant border-radius property that can be removed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| .playground-btn:focus-visible { | ||
| opacity: 1; | ||
| outline: 3px solid var(--chapter-accent, var(--compiler)); | ||
| outline-offset: 2px; | ||
| border-radius: 5px; | ||
| } |
There was a problem hiding this comment.
The playground button is positioned inside the code block (pre), which always has a dark background (#1a1b26) in both light and dark modes. Using var(--chapter-accent, var(--compiler)) as the outline color results in extremely low contrast (e.g., #023e8a on #1a1b26 has a contrast ratio of ~1.6:1), making the focus indicator virtually invisible to keyboard users. To ensure high visibility and meet WCAG accessibility standards, use a high-contrast color like #ffffff or a bright color like var(--perf, #ffbe0b) for the outline. Additionally, border-radius: 5px is already defined on .playground-btn (line 1572) and does not need to be repeated here.
.playground-btn:focus-visible {
opacity: 1;
outline: 3px solid #ffffff;
outline-offset: 2px;
}
💡 What:
Added an
aria-labelto the "Run" overlay button for Rust code blocks indicating that the button opens in a new tab, and added explicitly matching:focus-visiblestyling in CSS.🎯 Why:
The link-based floating button had brief text ("Run") that didn't explain the context (Rust Playground, new tab) for screen readers, and it entirely lacked keyboard focus visibility, making it difficult for keyboard users to interact with.
♿ Accessibility:
📸 Before/After:
(See PR frontend verification screenshots/videos for the clear focus states now available on the button)
PR created automatically by Jules for task 7856096359349428289 started by @lavkushry