Skip to content

[Studio UI] Add global focus-visible indicator for keyboard users - #4067

Merged
idaiv merged 6 commits into
2026.xfrom
fix/global-focus-visible
Sep 4, 2026
Merged

[Studio UI] Add global focus-visible indicator for keyboard users#4067
idaiv merged 6 commits into
2026.xfrom
fix/global-focus-visible

Conversation

@idaiv

@idaiv idaiv commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Global :focus-visible style in globals.css — 2px outline on keyboard focus
  • :focus:not(:focus-visible) hides outline on mouse clicks
  • Uses --ant-color-primary-border CSS variable for theme consistency
  • Fixes WCAG 2.4.7 (Focus Visible) globally

Test plan

  • Tab through any part of the UI — all buttons, links, inputs show a blue outline
  • Click with mouse — no outline visible
  • Verify the outline color matches the theme (changes with dark/light mode)

Relates to https://github.com/pimcore/product-management/issues/372

🤖 Generated with Claude Code

Consistent 2px outline on :focus-visible for all interactive elements.
Hidden on mouse clicks via :focus:not(:focus-visible). Uses Ant
Design's --ant-color-primary-border CSS variable for theme consistency.

Fixes WCAG 2.4.7 (Focus Visible) globally across the app.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 2, 2026 09:39
@idaiv idaiv added the Skip Milestone Check Exempts this PR from the mandatory milestone requirement label Sep 2, 2026

Copilot AI left a comment

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.

🟡 Changes recommended

Existing component styles override the indicator, and its color does not follow the active theme.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds global keyboard-focus styling to improve accessibility.

Changes:

  • Adds a 2px :focus-visible outline.
  • Suppresses outlines for pointer focus.
File summaries
File Description
assets/css/globals.css Defines global focus indicator rules.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread assets/css/globals.css
* Shows a consistent 2px outline on keyboard focus, hidden on mouse clicks.
* Uses the Ant Design primary border color variable for theme consistency.
*/
:focus-visible {
Comment thread assets/css/globals.css Outdated
* Uses the Ant Design primary border color variable for theme consistency.
*/
:focus-visible {
outline: 2px solid var(--ant-color-primary-border, #91caff);
idaiv and others added 3 commits September 2, 2026 09:45
The previous --ant-color-primary-border fallback (#91caff) was the
default Ant blue, not the Pimcore purple. Use --ant-color-primary
(theme-derived #722ed1) with --pimcore-brand-color as secondary
fallback and #722ed1 as hardcoded last resort.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@idaiv
idaiv requested a review from vin0401 September 2, 2026 10:18
@idaiv idaiv modified the milestones: 2026.2.9, 2026.3.0 Sep 2, 2026
idaiv and others added 2 commits September 2, 2026 10:22
- Use --pimcore-brand-color with #722ed1 fallback (Ant CSS variable
  mode is not enabled, so --ant-color-primary is unavailable)
- Fix icon-button.styles.ts: was outline:none !important on
  :focus-visible, now shows the purple focus ring matching the
  global style

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@idaiv
idaiv requested a review from martineiber September 2, 2026 10:29
@idaiv idaiv removed the Skip Milestone Check Exempts this PR from the mandatory milestone requirement label Sep 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

@idaiv
idaiv removed the request for review from martineiber September 2, 2026 10:36
@idaiv
idaiv merged commit 5dee103 into 2026.x Sep 4, 2026
2 checks passed
@idaiv
idaiv deleted the fix/global-focus-visible branch September 4, 2026 09:29
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants