Skip to content

Fix #469: wrap --ag-focus in rgba() to restore invisible focus rings#472

Merged
roblevintennis merged 3 commits intomasterfrom
issue-469/collapsible-focus-ring
Mar 27, 2026
Merged

Fix #469: wrap --ag-focus in rgba() to restore invisible focus rings#472
roblevintennis merged 3 commits intomasterfrom
issue-469/collapsible-focus-ring

Conversation

@roblevintennis
Copy link
Copy Markdown
Contributor

Summary

  • --ag-focus is a raw RGB triplet token (e.g. 210, 105, 30), so using it bare as solid var(--ag-focus) produces an invalid CSS color and an invisible focus ring
  • Fixed 5 components by wrapping with rgba(var(--ag-focus), 0.5), matching the correct pattern already used by Accordion, Button, Checkbox, Input, Link, etc.

Components fixed:

  • Collapsiblesummary:focus-visible (primary issue)
  • Badge — interactive badge :focus-visible
  • Breadcrumb — link :focus-visible
  • Menu — button/a :focus
  • IconButton — button :focus-visible

Test plan

  • Verified focus ring visible on ag-collapsible in v2/sdui/demo-lit via keyboard Tab navigation
  • Fix is in Lit shadow DOM static styles, so React and Vue wrappers inherit it automatically

Closes #469

--ag-focus is a raw RGB triplet, not a hex color, so it must be used
as rgba(var(--ag-focus), 0.5) to produce a valid outline color.
Matches the pattern already used by ag-accordion-item.
…Button

Audit of v2/lib components revealed four more components using bare
var(--ag-focus) as an outline color. Since --ag-focus is a raw RGB
triplet, it must be wrapped in rgba() to produce a valid CSS color.
Aligns all components with the correct pattern already used by Accordion,
Button, Checkbox, Input, Link, Pagination, Radio, Toggle, and others.
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for agnosticui-demo-react ready!

Name Link
🔨 Latest commit c490f4c
🔍 Latest deploy log https://app.netlify.com/projects/agnosticui-demo-react/deploys/69c6e44a7bcbaf000871f312
😎 Deploy Preview https://deploy-preview-472--agnosticui-demo-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@roblevintennis roblevintennis merged commit e745532 into master Mar 27, 2026
8 of 9 checks passed
@roblevintennis roblevintennis deleted the issue-469/collapsible-focus-ring branch March 27, 2026 20:10
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for agnosticui-demo-lit ready!

Name Link
🔨 Latest commit c490f4c
🔍 Latest deploy log https://app.netlify.com/projects/agnosticui-demo-lit/deploys/69c6e44a6869260008456c11
😎 Deploy Preview https://deploy-preview-472--agnosticui-demo-lit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for agnosticui-demo-vue ready!

Name Link
🔨 Latest commit c490f4c
🔍 Latest deploy log https://app.netlify.com/projects/agnosticui-demo-vue/deploys/69c6e44a1dfd9400081c9789
😎 Deploy Preview https://deploy-preview-472--agnosticui-demo-vue.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

fix(collapsible): missing focus ring on summary trigger breaks keyboard a11y

1 participant