🎨 Palette: [UX improvement] Add ARIA labels and focus states to playground inputs#45
🎨 Palette: [UX improvement] Add ARIA labels and focus states to playground inputs#45aloewright wants to merge 1 commit into
Conversation
Co-authored-by: aloewright <3641844+aloewright@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. |
|
Warning Review limit reached
More reviews will be available in 49 minutes and 54 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
postpilot | 2f3f5e8 | May 26 2026, 05:37 AM |
There was a problem hiding this comment.
Code Review
This pull request adds focus-visible styling and accessibility attributes to various form controls in the PlaygroundView component. The reviewer's feedback highlights that several of the newly added aria-label attributes are redundant due to implicit label nesting within <Control> or <label> wrappers. Additionally, some labels override dynamic values or visible text, which could negatively impact screen readers and violate WCAG guidelines.
| aria-label="Guide" | ||
| className="pp-select focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--strand-color-accent-lede)]" |
There was a problem hiding this comment.
The <select> element is already nested inside a <Control> component, which renders a <label> element. In HTML, nesting form controls inside a <label> implicitly associates them, providing the accessible name automatically. Therefore, aria-label="Guide" is redundant and can be safely removed to keep the markup clean.
| aria-label="Guide" | |
| className="pp-select focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--strand-color-accent-lede)]" | |
| className="pp-select focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--strand-color-accent-lede)]" |
| aria-label="Preset" | ||
| className="pp-select focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--strand-color-accent-lede)]" |
There was a problem hiding this comment.
Similar to the Guide dropdown, this <select> is nested inside a <Control> component (which renders a <label>). The implicit label association automatically provides the accessible name, making aria-label="Preset" redundant.
| aria-label="Preset" | |
| className="pp-select focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--strand-color-accent-lede)]" | |
| className="pp-select focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--strand-color-accent-lede)]" |
| aria-label="Temperature" | ||
| className="w-full" |
There was a problem hiding this comment.
The <Control> wrapper here has a dynamic label: Temperature · {temperature.toFixed(1)}. By hardcoding aria-label="Temperature", screen readers will only announce "Temperature" and won't announce the dynamic temperature value when focusing the slider. Removing the aria-label allows the implicit label to be used, which correctly includes the dynamic value.
| aria-label="Temperature" | |
| className="w-full" | |
| className="w-full" |
| aria-label="Extra pass (slower)" | ||
| checked={humanizeExtraPass} |
There was a problem hiding this comment.
The checkbox is nested inside a <label> with the visible text Extra pass (slower, more thorough). Setting aria-label="Extra pass (slower)" overrides the visible label for screen readers, resulting in a mismatch between the visible text and the accessible name. This violates WCAG 2.5.3 (Label in Name). Removing the aria-label ensures the full visible text is used as the accessible name.
| aria-label="Extra pass (slower)" | |
| checked={humanizeExtraPass} | |
| checked={humanizeExtraPass} |
| aria-label="Humanize output" | ||
| checked={on} |
There was a problem hiding this comment.
There was a problem hiding this comment.
Pull request overview
This PR improves accessibility in the Quill Playground by adding accessible names and visible keyboard focus styling to key form controls.
Changes:
- Adds
aria-labelattributes to Playground select, range, textarea, and checkbox controls. - Adds
focus-visibleoutline styling to the Guide/Preset selects and Input textarea. - Reuses the app’s existing accent outline token for focus indication.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| style={{ color: "var(--strand-color-ink-muted)" }} | ||
| > | ||
| <input | ||
| aria-label="Extra pass (slower)" |
| }} | ||
| > | ||
| <input | ||
| aria-label="Humanize output" |
💡 What: Added
aria-labelattributes to the 6 inputs in the Playground view (Guide,Preset,Temperature,Input,Humanize output, andExtra pass) and explicitly setfocus-visiblestyling on the<textarea>and custom<select>wrappers using the standardfocus-visible:outline-[var(--strand-color-accent-lede)].🎯 Why: Custom UI components without visual focus styles impair keyboard navigation by leaving users "lost" as they tab through interactive elements. In addition, the custom form wrappers in the playground passing inputs implicitly lacked necessary ARIA labeling for screen readers to properly announce the input's purpose.
📸 Before/After: Before, focusing the
Inputtextarea or theGuidedropdown displayed nothing. After, pressingTabclearly highlights them with the app's distinct red accent ring.♿ Accessibility: Added proper screen reader announcements and crucial keyboard navigation visibility.
PR created automatically by Jules for task 7088869935116163878 started by @aloewright