Skip to content

🎨 Palette: Add focus-visible states to core buttons - #4347

Closed
dieterolson wants to merge 1 commit into
mainfrom
palette-focus-visible-14866957424878358747
Closed

🎨 Palette: Add focus-visible states to core buttons#4347
dieterolson wants to merge 1 commit into
mainfrom
palette-focus-visible-14866957424878358747

Conversation

@dieterolson

Copy link
Copy Markdown
Collaborator

💡 What: Added focus-visible styling to .btn and .tab-btn classes in index.css.
🎯 Why: To ensure that core interactive elements have clear visual focus indicators when navigated via keyboard, improving accessibility for keyboard-only users.
📸 Before/After: N/A (CSS style addition)
♿ Accessibility: Resolves an accessibility issue where standard buttons utilizing the .btn and .tab-btn utility classes lacked focus ring accessibility, despite inputs and other tabs being styled properly.


PR created automatically by Jules for task 14866957424878358747 started by @dieterolson

Co-authored-by: dieterolson <198168927+dieterolson@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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d0771c844

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +271 to +272
outline: none;
box-shadow: 0 0 0 2px var(--panel-bg), 0 0 0 4px var(--accent-cyan);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve a focus outline in forced-colors mode

When forced-colors: active is used, such as Windows High Contrast mode, browsers suppress author box shadows and replace author background colors with system colors. Removing the native outline here therefore makes the new .btn indicator disappear entirely; the later .tab-btn rule has the same problem. Keep an outline or add a forced-colors override so keyboard focus remains visible in this environment.

Useful? React with 👍 / 👎.

Comment on lines +409 to +412
.tab-btn:focus-visible {
outline: none;
background: var(--cell-hover-bg);
border-radius: 4px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a contrasting focus indicator for tab buttons

In the normal themes, keyboard focus on a tab is indicated only by this background because the outline is removed. Against the tab bar's --bg-color, --cell-hover-bg has only about 1.72:1 contrast in the dark theme and 1.18:1 in the light theme, making the focus change especially difficult to perceive in light mode. Use a distinct outline or ring like the .btn treatment rather than relying solely on this low-contrast fill.

Useful? React with 👍 / 👎.

@dieterolson

Copy link
Copy Markdown
Collaborator Author

Consolidated into #4408. Closing to reduce CI/CD runner load.

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