Skip to content

🎨 Palette: [UX improvement] Enhance Keyboard Accessibility and ARIA Support#31

Open
LVT-ENG wants to merge 1 commit intomainfrom
palette-accessibility-improvement-4338780450309068300
Open

🎨 Palette: [UX improvement] Enhance Keyboard Accessibility and ARIA Support#31
LVT-ENG wants to merge 1 commit intomainfrom
palette-accessibility-improvement-4338780450309068300

Conversation

@LVT-ENG
Copy link
Copy Markdown
Member

@LVT-ENG LVT-ENG commented Mar 25, 2026

💡 What: Added keyboard navigation support for product selection, enhanced focus visibility across the app, and improved ARIA labeling for better screen reader compatibility.

🎯 Why: The previous interface relied heavily on mouse interactions and lacked clear visual cues for keyboard-focused elements, making it difficult for users with motor or visual impairments to navigate.

♿ Accessibility:

  • Added tabindex="0" and role="button" to product items.
  • Implemented Enter/Space keydown handlers for product selection.
  • Added :focus-visible styles with a clear gold outline for all interactive elements.
  • Added descriptive aria-label to product items and the private pass input.

PR created automatically by Jules for task 4338780450309068300 started by @LVT-ENG

…upport

- Added focus-visible styles for all interactive elements.
- Improved accessibility for product selector (tabindex, role, keyboard listeners).
- Added ARIA labels to key interactive elements.
- Refactored product selection to use data attributes instead of inline onclick.

Co-authored-by: LVT-ENG <214667862+LVT-ENG@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.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
_deploy_build Ready Ready Preview, Comment Mar 25, 2026 5:53am
tryonyou-org Ready Ready Preview, Comment Mar 25, 2026 5:53am

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the application's accessibility by introducing robust keyboard navigation, clear visual focus indicators, and improved ARIA support. These changes aim to make the interface more usable for individuals relying on keyboard input or screen readers, addressing previous limitations in interaction and visual feedback.

Highlights

  • Keyboard Navigation: Implemented keyboard navigation support for product selection, allowing users to activate product items using the 'Enter' and 'Space' keys.
  • Focus Visibility: Enhanced visual focus indicators across all interactive elements, including navigation links, buttons, and product items, using :focus-visible styles for improved clarity.
  • ARIA Support: Improved ARIA labeling for product items and the private pass input field, making the interface more compatible and descriptive for screen readers.
  • Semantic HTML: Added tabindex="0" and role="button" attributes to custom product item div elements to ensure they are keyboard focusable and semantically identifiable as interactive controls.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 significantly enhances the accessibility of the application by implementing ARIA attributes (role="button", aria-label), tabindex="0", and keyboard event handling for custom interactive elements like product items. It also introduces focus-visible styles for various interactive components to improve keyboard navigation feedback. Feedback suggests refactoring the keydown handler in js/main.js to directly call this.selectGarment for better clarity and efficiency, and grouping identical :focus-visible CSS rules for improved maintainability.

Comment on lines +89 to +94
item.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
item.click();
}
});
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

For better code clarity and to avoid dispatching a synthetic event, it's better to call the this.selectGarment() method directly instead of programmatically triggering a click. This makes the code's intent clearer, avoids the overhead of the event system, and removes the dependency on the click event handler.

Suggested change
item.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
item.click();
}
});
item.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.selectGarment(productId, item);
}
});

Comment on lines +85 to +88
.nav-menu a:focus-visible {
outline: 2px solid var(--accent-gold);
outline-offset: 4px;
}
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

To improve maintainability and reduce code duplication, consider grouping all the new :focus-visible styles into a single rule set. The styles for .nav-menu a:focus-visible, .cta-button:focus-visible, .camera-btn:focus-visible, and .product-item:focus-visible are identical.

You could define a single rule like this in a shared/global styles section and remove the other individual declarations:

.nav-menu a:focus-visible,
.cta-button:focus-visible,
.camera-btn:focus-visible,
.product-item:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

This makes it easier to update the focus style consistently across the application in the future.

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