Skip to content

🎨 Palette: Add focus-visible styles to ConversionAssets buttons#956

Open
anchapin wants to merge 2 commits intomainfrom
palette/conversionassets-focus-visible-59125363831365138
Open

🎨 Palette: Add focus-visible styles to ConversionAssets buttons#956
anchapin wants to merge 2 commits intomainfrom
palette/conversionassets-focus-visible-59125363831365138

Conversation

@anchapin
Copy link
Copy Markdown
Owner

@anchapin anchapin commented Apr 4, 2026

💡 What: Added :focus-visible styles to interactive buttons in ConversionAssets.css.
🎯 Why: Enhances keyboard accessibility by providing clear visual focus indicators, ensuring keyboard users can easily see which element is active without affecting mouse users.
♿ Accessibility: Improved keyboard navigation support for ConversionAssets UI elements.


PR created automatically by Jules for task 59125363831365138 started by @anchapin

Summary by Sourcery

Add keyboard-focus visible styling to ConversionAssets action buttons and document the accessibility pattern in Palette guidelines.

Enhancements:

  • Add :focus-visible outline styles to ConversionAssets action, upload, close, edit, save, convert, and retry buttons to improve keyboard accessibility.

Documentation:

  • Document the use of :focus-visible for custom interactive elements in Palette accessibility guidelines.

Co-authored-by: anchapin <6326294+anchapin@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.

Copilot AI review requested due to automatic review settings April 4, 2026 23:54
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 4, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds keyboard-accessible :focus-visible outline styles to all ConversionAssets action buttons and documents the accessibility pattern in the Jules palette notes.

State diagram for button visual states with focus-visible styles

stateDiagram-v2
  [*] --> Idle

  Idle --> Hover
  Idle --> FocusVisible

  Hover --> Idle
  Hover --> FocusVisible

  FocusVisible --> Idle

  state Idle {
    [*] --> Default
    Default: No_outline
  }

  state Hover {
    [*] --> Hovered
    Hovered: Hover_styles_only
  }

  state FocusVisible {
    [*] --> KeyboardFocused
    KeyboardFocused: Outline_2px_solid_3b82f6_with_outline_offset_2px
  }
Loading

File-Level Changes

Change Details Files
Add :focus-visible focus ring styling for all primary ConversionAssets action buttons to improve keyboard accessibility.
  • Introduce a shared :focus-visible rule targeting refresh, retry, action, upload, close, metadata, convert, and details buttons.
  • Define a consistent 2px solid blue outline with 2px outline-offset to clearly indicate keyboard focus without shifting layout.
frontend/src/components/ConversionAssets/ConversionAssets.css
Document the new accessibility pattern in the Jules palette guidelines.
  • Create a palette note describing why :focus-visible is preferred over generic focus styles for custom interactive elements.
  • Capture an action item to always add outline and outline-offset :focus-visible styles for custom interactive elements going forward.
.jules/palette.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The hard-coded #3b82f6 focus outline color should likely be replaced with a Palette design token or existing theme variable so it stays consistent with the rest of the system and is easier to update later.
  • The long selector list for :focus-visible suggests these buttons could share a common class (e.g. .ca-button) so the focus style is defined once and new buttons automatically inherit it.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The hard-coded `#3b82f6` focus outline color should likely be replaced with a Palette design token or existing theme variable so it stays consistent with the rest of the system and is easier to update later.
- The long selector list for `:focus-visible` suggests these buttons could share a common class (e.g. `.ca-button`) so the focus style is defined once and new buttons automatically inherit it.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves keyboard accessibility in the Conversion Assets UI by adding explicit :focus-visible styling for key action buttons, helping keyboard users identify the currently focused control.

Changes:

  • Added :focus-visible outline/offset styling for multiple button classes in ConversionAssets.css.
  • Added a Palette learning note documenting the accessibility pattern and recommendation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend/src/components/ConversionAssets/ConversionAssets.css Adds component-scoped :focus-visible styles for ConversionAssets action buttons.
.jules/palette.md Documents the accessibility learning/action for using :focus-visible focus indicators.

Comment on lines +831 to +843
/* Accessibility: Focus-visible for action buttons */
.refresh-button:focus-visible,
.retry-button:focus-visible,
.action-button:focus-visible,
.upload-button:focus-visible,
.close-button:focus-visible,
.edit-metadata-button:focus-visible,
.save-metadata-button:focus-visible,
.convert-asset-button:focus-visible,
.close-details-button:focus-visible,
.convert-all-button:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 2px;
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The PR description says this change improves keyboard focus "without affecting mouse users", but these rules only style :focus-visible. Mouse clicks can still trigger the global button:focus outline from frontend/src/index.css (button:focus, button:focus-visible), so mouse users may still see a focus outline. If the intent is to show focus rings only for keyboard navigation, consider removing/adjusting the global button:focus rule or explicitly overriding :focus (non-focus-visible) for these button classes.

Copilot uses AI. Check for mistakes.
Co-authored-by: anchapin <6326294+anchapin@users.noreply.github.com>
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.

2 participants