-
Notifications
You must be signed in to change notification settings - Fork 0
🎨 Palette: [UX improvement] Add ARIA labels to playground controls #46
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -295,6 +295,7 @@ export function PlaygroundView({ | |||||||
| <div className="mb-6 grid gap-3 md:grid-cols-3"> | ||||||||
| <Control label="Guide"> | ||||||||
| <select | ||||||||
| aria-label="Guide" | ||||||||
| className="pp-select" | ||||||||
| onChange={(e) => setGuideSlug(e.target.value)} | ||||||||
| value={guideSlug} | ||||||||
|
|
@@ -309,6 +310,7 @@ export function PlaygroundView({ | |||||||
|
|
||||||||
| <Control label="Preset"> | ||||||||
| <select | ||||||||
| aria-label="Preset" | ||||||||
| className="pp-select" | ||||||||
|
Comment on lines
+313
to
314
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the "Guide" control, the Consider removing the redundant
Suggested change
|
||||||||
| onChange={(e) => setPresetSlug(e.target.value as UseCase | "")} | ||||||||
| value={presetSlug} | ||||||||
|
|
@@ -326,6 +328,7 @@ export function PlaygroundView({ | |||||||
|
|
||||||||
| <Control label={`Temperature · ${temperature.toFixed(1)}`}> | ||||||||
| <input | ||||||||
| aria-label="Temperature" | ||||||||
| className="w-full" | ||||||||
| max="1" | ||||||||
| min="0" | ||||||||
|
|
||||||||
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.
Since the
<select>element is already nested inside a<label>element (via the<Control>wrapper), it is implicitly associated with the label text "Guide". Adding an explicitaria-labelwith the exact same text is redundant and can cause some screen readers to double-announce the label (e.g., "Guide, Guide, pop-up button").Consider removing the redundant
aria-labelattribute.