Skip to content

🎨 Palette: Enhance UploadResumeModal accessibility#495

Closed
aafre wants to merge 1 commit into
mainfrom
palette/upload-modal-a11y-2339022617521647010
Closed

🎨 Palette: Enhance UploadResumeModal accessibility#495
aafre wants to merge 1 commit into
mainfrom
palette/upload-modal-a11y-2339022617521647010

Conversation

@aafre
Copy link
Copy Markdown
Owner

@aafre aafre commented Apr 25, 2026

  • What: Added role="dialog", aria-modal="true", and aria-labelledby to the upload modal. Fixed the file input's keyboard accessibility by replacing hidden with sr-only peer and adding peer-focus-visible to its label. Added aria-label and focus-visible styles to all modal buttons.
  • Why: The modal was not correctly announced to screen readers. Furthermore, the file input used hidden which removed it from the tab order, making it impossible to upload files using only a keyboard. The close and action buttons lacked visible focus indicators, hindering keyboard navigation.
  • Before/After: Before, the file input could not be tabbed to, and the modal was missing standard dialog semantics. Now, the entire upload flow can be navigated and executed via keyboard, with clear visual focus states and screen reader support.
  • Accessibility: Ensured compliance with WAI-ARIA dialog patterns, maintained keyboard tab order for file inputs, and added clear focus indicators and ARIA labels.

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

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 improves the accessibility of the UploadResumeModal by adding proper ARIA attributes, implementing keyboard-accessible focus rings for buttons, and fixing the file input visibility using peer classes. I have provided feedback regarding the missing focus trap for the modal and a correction for the disabled state styling on the file upload label.

<div className="bg-white rounded-xl shadow-2xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-hidden">
<div
role="dialog"
aria-modal="true"
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

While adding aria-modal="true" is a significant improvement for accessibility, the general rules for this repository require all modals to implement a focus trap. This ensures that keyboard navigation remains contained within the modal while it is active, preventing focus from leaking to background elements. Consider using a library like react-focus-lock or implementing a custom focus trap to satisfy this requirement.

References
  1. For accessibility, all modals must implement a focus trap to ensure keyboard focus remains within the modal's focusable elements while it is open.

<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"
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 does not work on elements because they do not support the :disabled pseudo-class. Since the associated file input has the peer class, you should use peer-disabled:opacity-50 to correctly style the label when the input is disabled. Additionally, adding peer-disabled:cursor-not-allowed provides better visual feedback for keyboard and mouse users.

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"
className="btn-primary inline-flex items-center gap-2 px-6 py-3 cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-50 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 May 25, 2026

Closing duplicate — the most recent version of this change is PR #537.

@aafre aafre closed this May 25, 2026
@google-labs-jules
Copy link
Copy Markdown
Contributor

Closing duplicate — the most recent version of this change is PR #537.

Understood. Acknowledging that this work is a duplicate 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