Skip to content

🎨 Palette: Accessible Form Controls and File Dropzone#68

Draft
Nawayisus wants to merge 1 commit intomainfrom
palette-a11y-dropzone-labels-15269096028294885989
Draft

🎨 Palette: Accessible Form Controls and File Dropzone#68
Nawayisus wants to merge 1 commit intomainfrom
palette-a11y-dropzone-labels-15269096028294885989

Conversation

@Nawayisus
Copy link
Copy Markdown
Owner

This PR implements several micro-UX and accessibility improvements as the Palette persona.

💡 What:

  • Form labels now correctly point to their associated inputs.
  • The custom drag-and-drop file upload zone has been converted into an accessible button. It can be navigated to via the Tab key, visually highlights when focused, and can be triggered by pressing Enter or Space.
  • The progress bar area now correctly broadcasts updates to screen readers.

🎯 Why:
Custom interactive areas like <div> dropzones are completely invisible to keyboard-only users and screen readers by default. By mapping proper ARIA roles, tabindex, and wiring up the existing visual highlight functions to the focus and blur events, we ensure all users can easily discover and use the primary action of the application without needing a mouse.

Accessibility:

  • Added for attributes to all form labels.
  • Added tabindex="0", role="button", and aria-label to #dropZone.
  • Mapped focus/blur to visual highlight functions.
  • Wired up keydown event listener to trigger file input on Enter or Space while preventing default scroll behaviors.
  • Added aria-live="polite" and aria-valuenow updates to #progressBar.

A critical learning regarding the manual wiring required for custom accessible dropzones has been logged to .Jules/palette.md.


PR created automatically by Jules for task 15269096028294885989 started by @Nawayisus

- Add 'for' attributes to all settings form labels connecting them to their respective select fields.
- Make the custom file dropzone fully keyboard accessible (tabindex, role, aria-label, enter/space keyboard triggers).
- Map visual drag highlights to keyboard focus and blur states.
- Ensure the translation progress bar has appropriate ARIA attributes (aria-live, aria-valuenow).
- Log accessible dropzone pattern in palette journal.

Co-authored-by: Nawayisus <154715157+Nawayisus@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant