Skip to content

🎨 Palette: [UX improvement] - Fix accessibility and contrast in UploadResumeModal#438

Closed
aafre wants to merge 1 commit into
mainfrom
palette/upload-modal-accessibility-11032632034912310741
Closed

🎨 Palette: [UX improvement] - Fix accessibility and contrast in UploadResumeModal#438
aafre wants to merge 1 commit into
mainfrom
palette/upload-modal-accessibility-11032632034912310741

Conversation

@aafre
Copy link
Copy Markdown
Owner

@aafre aafre commented Apr 2, 2026

🎨 Palette: [UX improvement] - Fix accessibility and contrast in UploadResumeModal

  • 💡 What:
    • Added an aria-label to the Close icon button in the UploadResumeModal.
    • Added keyboard focus-visible styles to the Close and Cancel buttons.
    • Improved the hover state contrast of the Cancel button.
    • Updated the file input to use sr-only peer instead of hidden so it receives keyboard focus, and styled the adjacent <label> with peer-focus-visible to display the focus ring.
  • 🎯 Why:
    • Icon-only buttons need an aria-label for screen reader users to understand their purpose.
    • The file input was hidden from the DOM tab order using className="hidden", meaning keyboard users could not focus on it to upload files.
    • The "Cancel" button's hover state lacked contrast and didn't clearly indicate focus for keyboard users.
  • ♿ Accessibility:
    • Screen readers now announce "Close modal".
    • Keyboard users can now tab to the "Choose File" button, see the focus ring, and activate it with Space/Enter.
    • Focus visibility is ensured for all interactive elements in the modal footer and header.

PR created automatically by Jules for task 11032632034912310741 started by @aafre

…dResumeModal

*   **💡 What:**
    *   Added an `aria-label` to the Close icon button in the `UploadResumeModal`.
    *   Added keyboard `focus-visible` styles to the Close and Cancel buttons.
    *   Improved the hover state contrast of the Cancel button.
    *   Updated the file input to use `sr-only peer` instead of `hidden` so it receives keyboard focus, and styled the adjacent `<label>` with `peer-focus-visible` to display the focus ring.
*   **🎯 Why:**
    *   Icon-only buttons need an `aria-label` for screen reader users to understand their purpose.
    *   The file input was hidden from the DOM tab order using `className="hidden"`, meaning keyboard users could not focus on it to upload files.
    *   The "Cancel" button's hover state lacked contrast and didn't clearly indicate focus for keyboard users.
*   **♿ Accessibility:**
    *   Screen readers now announce "Close modal".
    *   Keyboard users can now tab to the "Choose File" button, see the focus ring, and activate it with Space/Enter.
    *   Focus visibility is ensured for all interactive elements in the modal footer and header.

Co-authored-by: aafre <8656674+aafre@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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the accessibility and keyboard navigation of the UploadResumeModal component by adding focus rings to buttons, including an ARIA label for the close button, and updating the file input to be screen-reader accessible. Feedback was provided to correct the styling of the file input label, specifically replacing the ineffective disabled:opacity-50 utility with peer-disabled variants to correctly reflect the state of the associated input during parsing.

<label
htmlFor="resume-file-input"
className="btn-primary inline-flex items-center gap-2 px-6 py-3 cursor-pointer disabled:opacity-50"
className="btn-primary inline-flex items-center gap-2 px-6 py-3 cursor-pointer disabled:opacity-50 peer-focus-visible:ring-2 peer-focus-visible:ring-accent peer-focus-visible:ring-offset-2 peer-focus-visible:outline-none"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The disabled:opacity-50 utility is ineffective on a element because labels do not support the :disabled pseudo-class. Since the associated input is a sibling with the peer class, you should use peer-disabled:opacity-50 to correctly reflect the disabled state visually. Additionally, adding peer-disabled:cursor-not-allowed improves the user experience by signaling that the element is inactive while parsing is in progress, and peer-focus-visible:outline-none is redundant as labels do not have a default focus outline.

Suggested change
className="btn-primary inline-flex items-center gap-2 px-6 py-3 cursor-pointer disabled:opacity-50 peer-focus-visible:ring-2 peer-focus-visible:ring-accent peer-focus-visible:ring-offset-2 peer-focus-visible:outline-none"
className="btn-primary inline-flex items-center gap-2 px-6 py-3 cursor-pointer peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-focus-visible:ring-2 peer-focus-visible:ring-accent peer-focus-visible:ring-offset-2"

@aafre
Copy link
Copy Markdown
Owner Author

aafre commented Apr 11, 2026

Closing: superseded by #442 (most comprehensive). Cherry-picked into #457.

@aafre aafre closed this Apr 11, 2026
@google-labs-jules
Copy link
Copy Markdown
Contributor

Closing: superseded by #442 (most comprehensive). Cherry-picked into #457.

Understood. Acknowledging that this work is now obsolete and stopping work on 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