Skip to content

feat: add focus-visible styles to home page buttons and code blocks.#1069

Open
connorshea wants to merge 3 commits intooxc-project:mainfrom
connorshea:claude/add-button-focus-styles-0ZUsZ
Open

feat: add focus-visible styles to home page buttons and code blocks.#1069
connorshea wants to merge 3 commits intooxc-project:mainfrom
connorshea:claude/add-button-focus-styles-0ZUsZ

Conversation

@connorshea
Copy link
Copy Markdown
Member

@connorshea connorshea commented Apr 25, 2026

Adds keyboard-focus outlines to the Get Started, View on GitHub, and Usage Guide buttons on the home page so they have a visible indicator when navigating with keyboard.

It's a bit hard to see when not actively using the page, but basically the "Get Started" button has an additional focus outline now when focused, same thing for other buttons that lacked focus styles here:

Screenshot 2026-04-25 at 1 25 58 PM

The code blocks with tabs have also been updated accordingly, to make it easier to tell when the code block is focused and tabs can be interacted-with:

Screenshot 2026-04-25 at 1 34 37 PM

This was generated with Claude Code, it may be worth making this change universally in the VoidZero theme, but I don't have any ability to do that, so that'd be up to someone else to do :)

Adds keyboard-focus outlines to the Get Started, View on GitHub, and
Usage Guide buttons on the home page so they have a visible indicator
when navigated to via the tab key.
Copilot AI review requested due to automatic review settings April 25, 2026 19:28
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 25, 2026

Deploy Preview for oxc-project ready!

Name Link
🔨 Latest commit 4089826
🔍 Latest deploy log https://app.netlify.com/projects/oxc-project/deploys/69ed16e5e4908c0008834f20
😎 Deploy Preview https://deploy-preview-1069--oxc-project.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.

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

Adds a visible keyboard focus indicator to the home/landing page “button” links by introducing a :focus-visible outline style in the VitePress theme stylesheet.

Changes:

  • Add global .button:focus-visible outline + offset styling using the site brand color.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

.button:focus-visible {
outline: 2px solid var(--color-brand);
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

The new .button:focus-visible rule uses var(--color-brand), but that CSS variable is only defined under :root[data-variant="oxc"] selectors. If data-variant is ever missing/changed (or this CSS is reused for a different variant), the outline declaration becomes invalid and focus styles disappear. Consider switching to the already-used VitePress brand token (--vp-c-brand-1) or adding a fallback like var(--color-brand, var(--vp-c-brand-1)) to keep focus indicators reliable and consistent with other components (e.g. RulesTable.vue).

Suggested change
outline: 2px solid var(--color-brand);
outline: 2px solid var(--color-brand, var(--vp-c-brand-1));

Copilot uses AI. Check for mistakes.
claude added 2 commits April 25, 2026 19:31
Adds a keyboard-focus outline to code-group tab labels so users can see
which tab is focused when navigating with the tab key.
Outline the entire code-group block when a tab is keyboard-focused
instead of only the individual tab label.
@connorshea connorshea changed the title feat: add focus-visible styles to home page buttons. feat: add focus-visible styles to home page buttons and code blocks. Apr 25, 2026
@leaysgur
Copy link
Copy Markdown
Member

it may be worth making this change universally in the VoidZero theme, but I don't have any ability to do that, so that'd be up to someone else to do :)

After briefly checking the theme side, I noticed that while the focus-visible property is defined, it appears to have been accidentally disabled. I'm reporting it for now.

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.

4 participants