🎨 Palette: [Accessibility] Improve focus indicator for image clear button#60
🎨 Palette: [Accessibility] Improve focus indicator for image clear button#60MacTechIN wants to merge 1 commit into
Conversation
…tton Co-authored-by: MacTechIN <63564804+MacTechIN@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. |
There was a problem hiding this comment.
Code Review
This pull request introduces accessibility improvements for absolute positioned overlay buttons, applying them to the remove button in ImageUploader.tsx and documenting the guidelines in .Jules/palette.md. The review feedback recommends explicitly adding type="button" to the remove button to prevent accidental form submissions when the component is rendered inside a form.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| className="absolute top-2 right-2 p-1.5 sm:p-2 bg-red-500 text-white rounded-full hover:bg-red-600 active:scale-95 transition-all shadow-lg" | ||
| className="absolute top-2 right-2 p-1.5 sm:p-2 bg-red-500 text-white rounded-full hover:bg-red-600 active:scale-95 transition-all shadow-lg focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none focus-visible:ring-red-500" | ||
| title={t('removeImage')} | ||
| aria-label={t('removeImage')} |
💡 What: Added
aria-label,aria-hidden, and explicit Tailwindfocus-visibleclasses to the absolute positioned "Remove Image" icon-only button within theImageUploadercomponent. Also updated.Jules/palette.mdto log a critical UX/accessibility learning regarding overlay buttons.🎯 Why: Absolute positioned overlay buttons inside
overflow-hiddencontainers can have their default browser focus rings clipped, making keyboard navigation difficult to track visually. Adding an explicitfocus-visiblering ensures visibility, while the ARIA attributes improve screen reader support for the icon-only button.📸 Before/After: Visually unchanged for mouse users. For keyboard users, tabbing to the clear button now explicitly shows a red focus ring (
focus-visible:ring-red-500) instead of being clipped by the parent container.♿ Accessibility:
aria-label={t('removeImage')}for screen readers.aria-hidden="true"to the inner SVG icon to prevent redundant announcements.PR created automatically by Jules for task 5381232497072462801 started by @MacTechIN