Skip to content

🎨 Palette: Add ARIA label to external docs link button - #166

Open
MillionthOdin16 wants to merge 1 commit into
mainfrom
palette/a11y-oauth-providers-card-10602061536119515160
Open

🎨 Palette: Add ARIA label to external docs link button#166
MillionthOdin16 wants to merge 1 commit into
mainfrom
palette/a11y-oauth-providers-card-10602061536119515160

Conversation

@MillionthOdin16

@MillionthOdin16 MillionthOdin16 commented Jul 21, 2026

Copy link
Copy Markdown
Owner
  • 💡 What: Added aria-label and tabIndex={-1} to the innermost icon-only <Button> nested inside the <a> wrapper for the OAuth provider docs link.
  • 🎯 Why: Ensures screen readers can correctly identify the element and prevents redundant tab stops (double focusing).
  • 📸 Before/After: N/A (Non-visual change).
  • ♿ Accessibility: Screen reader and keyboard navigation improvements for the docs link button.

PR created automatically by Jules for task 10602061536119515160 started by @MillionthOdin16

Summary by CodeRabbit

  • Accessibility
    • Improved the OAuth provider documentation link’s icon button with a clearer accessible label.
    • Updated keyboard focus behavior for a smoother navigation experience.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 21, 2026 18:52
@google-labs-jules

Copy link
Copy Markdown

👋 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 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The OAuth provider documentation icon button now has an explicit provider-specific accessible label and tabIndex={-1}, while retaining its existing ghost icon-button styling.

Changes

OAuth provider docs accessibility

Layer / File(s) Summary
Update docs button accessibility
web/src/components/OAuthProvidersCard.tsx
The provider docs icon button adds an aria-label matching the provider and tabIndex={-1} while retaining its existing styling.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested reviewers: austinpickett

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an ARIA label to the icon-only docs link button.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette/a11y-oauth-providers-card-10602061536119515160

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@web/src/components/OAuthProvidersCard.tsx`:
- Around line 225-230: Update the docs-link rendering around the Button and its
enclosing anchor so the anchor carries the `aria-label` and is the only
interactive element. Remove the nested icon button and its `tabIndex={-1}`,
while preserving the existing icon appearance and link destination.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d6bdb36-52e1-47a9-850c-971f74f9323a

📥 Commits

Reviewing files that changed from the base of the PR and between 64702f8 and f2887ca.

📒 Files selected for processing (1)
  • web/src/components/OAuthProvidersCard.tsx

Comment on lines +225 to +230
<Button
ghost
size="icon"
aria-label={`Open ${p.name} docs`}
tabIndex={-1}
>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the relevant file structure first
ast-grep outline web/src/components/OAuthProvidersCard.tsx --view expanded || true

# Inspect the changed area with line numbers
sed -n '200,245p' web/src/components/OAuthProvidersCard.tsx

# Find the Button component implementation and any asChild/link composition support
fd -a 'Button.*' web src . 2>/dev/null | head -n 50
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' 'asChild|Slot|forwardRef|button' web/src -g '*Button*' -g '*.tsx' -g '*.ts'

# Search for usages of Button wrapped in anchors or link composition patterns
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' '<a[^>]*>\s*<Button|<Button[^>]*asChild|aria-label=.*docs' web/src

Repository: MillionthOdin16/hermes-agent

Length of output: 24472


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the UI button implementation that web/src imports
fd -a 'button.tsx' .
fd -a 'Button.tsx' .
fd -a 'button.ts' .

# Read likely candidates from the UI package if present
for f in $(fd -a 'button.tsx' . | head -n 20); do
  echo "### $f"
  sed -n '1,260p' "$f"
done

for f in $(fd -a 'Button.tsx' . | head -n 20); do
  echo "### $f"
  sed -n '1,260p' "$f"
done

Repository: MillionthOdin16/hermes-agent

Length of output: 50384


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find how the web app resolves the `@nous-research/ui` import
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' '`@nous-research/ui/ui/components/button`|`@nous-research/ui`' web packages apps -g 'tsconfig*.json' -g 'vite.config.*' -g 'webpack.config.*' -g 'package.json' -g '*.ts' -g '*.tsx'

# Inspect the web app package/workspace config for path aliases or workspace links
sed -n '1,240p' web/package.json 2>/dev/null || true
sed -n '1,260p' package.json 2>/dev/null || true
sed -n '1,260p' tsconfig.json 2>/dev/null || true
sed -n '1,260p' web/tsconfig.json 2>/dev/null || true
sed -n '1,260p' web/vite.config.* 2>/dev/null || true

# Search for a matching button implementation under any ui package path
fd -a 'button.tsx' web apps packages ui . 2>/dev/null | sed -n '1,80p'

Repository: MillionthOdin16/hermes-agent

Length of output: 26909


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "### web/package.json"
sed -n '1,220p' web/package.json

echo "### web/vite.config.ts"
sed -n '1,220p' web/vite.config.ts

echo "### root package.json"
sed -n '1,260p' package.json

echo "### lockfile hints"
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' '"`@nous-research/ui`"|`@nous-research/ui`' package-lock.json pnpm-lock.yaml yarn.lock bun.lockb 2>/dev/null || true

Repository: MillionthOdin16/hermes-agent

Length of output: 7533


🌐 Web query:

@nour-research/ui 0.18.2 button asChild Slot.Root GitHub

💡 Result:

The use of Slot.Root in component patterns like Button with asChild is a common best practice in React applications, particularly when using Radix UI primitives, to ensure compatibility across different build environments and package resolutions [1][2]. In the context of a component like a Button, the asChild prop allows the component to merge its internal functionality (props, refs, event handlers) onto its child element instead of rendering a native HTML tag [1][3]. The Radix UI Slot component is used to perform this composition [1][3]. Using Slot.Root is specifically recommended when importing Slot from an umbrella package (like 'radix-ui') [2]. In some environments, simply importing Slot may result in an object namespace rather than the renderable component itself, leading to runtime errors like Element type is invalid [2]. Accessing Slot.Root explicitly ensures that the correct, renderable component is used [2]. While there is no specific package named @nour-research/ui, the pattern you are inquiring about is identical to the standard implementation found in widespread UI libraries like shadcn/ui [4][5] and various projects using the Radix Slot utility [1][6]. Implementation Pattern: import { Slot } from "radix-ui"; function Button({ asChild,...props }) { const Comp = asChild? Slot.Root: "button"; return <Comp {...props} />; }

Citations:


🌐 Web query:

"@nous-research/ui" 0.18.2 button source Slot.Root

💡 Result:

In the context of the @nous-research/ui library at version 0.18.2, the use of Slot.Root relates to the Radix UI Slot primitive, which is standardly used to implement an asChild API pattern [1][2][3]. The Slot.Root component merges its props onto its immediate child, allowing a custom component (such as a Button) to be polymorphic [1][4]. When a user passes the asChild prop to a component like Button, the component switches its underlying HTML element from the default (e.g., button) to the Slot.Root component [1][3]. Key points regarding its usage in this library: 1. Pattern: It is employed to facilitate the asChild pattern, enabling developers to render the Button component as a different HTML element or another component while still inheriting the Button's functionality and styling [1][3]. 2. Implementation: The standard implementation involves conditionally setting the component tag: const Comp = asChild? Slot.Root: 'button';, followed by returning <Comp {...props} /> [1][3]. 3. Breaking Changes: Version 0.18.2 of @nous-research/ui introduced breaking changes to the Button component's API, specifically removing several props (ghost, size, outlined, destructive) from ButtonProps [5]. Projects upgrading to this version often require updates to their usage of the Button component to align with the new design system primitives [6]. For detailed implementation logic, you can refer to the Radix UI Slot documentation, as @nous-research/ui builds upon these established primitives [1][2].

Citations:


Avoid nesting the icon button inside the docs link. Put the aria-label on the <a> and render a single interactive element here; tabIndex={-1} only removes the extra tab stop, it doesn’t fix the nested control semantics.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/components/OAuthProvidersCard.tsx` around lines 225 - 230, Update the
docs-link rendering around the Button and its enclosing anchor so the anchor
carries the `aria-label` and is the only interactive element. Remove the nested
icon button and its `tabIndex={-1}`, while preserving the existing icon
appearance and link destination.

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