Skip to content

Comments

🎨 Palette: Standardize tooltips and accessibility for icon-only buttons#535

Open
ngoiyaeric wants to merge 1 commit intomainfrom
palette-tooltip-accessibility-7713885870246008838
Open

🎨 Palette: Standardize tooltips and accessibility for icon-only buttons#535
ngoiyaeric wants to merge 1 commit intomainfrom
palette-tooltip-accessibility-7713885870246008838

Conversation

@ngoiyaeric
Copy link
Collaborator

@ngoiyaeric ngoiyaeric commented Feb 19, 2026

Improved accessibility and UX by standardizing tooltips and ARIA labels for icon-only buttons.


PR created automatically by Jules for task 7713885870246008838 started by @ngoiyaeric

Summary by CodeRabbit

Release Notes

  • New Features

    • Added tooltips to icon buttons across the app, providing helpful labels for icon-only controls.
    • Enhanced screen reader accessibility with proper labeling on interactive icon buttons for improved mobile and desktop usability.
  • Documentation

    • Added accessibility standards documentation for icon-only button implementation.

This change improves the user experience by adding tooltips and ARIA labels to icon-only buttons across the header, chat panel, and mobile bar.

Key improvements:
- Enabled `TooltipProvider` globally in `app/layout.tsx`.
- Added `Tooltip` and `aria-label` to History, Calendar, and Usage buttons in `components/header.tsx`.
- Added `aria-label` to all mobile icon buttons in `components/mobile-icons-bar.tsx`.
- Added `Tooltip` and `aria-label` to New Chat, Attachment, and Clear Attachment buttons in `components/chat-panel.tsx`.
- Replaced legacy `title` attributes with consistent tooltips.

This ensures that the interface is more intuitive for desktop users and accessible for screen reader users.

Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
@google-labs-jules
Copy link
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.

@vercel
Copy link
Contributor

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
qcx Ready Ready Preview, Comment Feb 19, 2026 10:23am

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Walkthrough

Added comprehensive accessibility enhancements across the application by introducing Tooltip components and aria-label attributes to icon-only buttons. This includes wrapping a TooltipProvider around the main layout, documenting accessibility standards in a new palette guide, and systematically applying tooltips and proper labeling to interactive icon buttons throughout the UI.

Changes

Cohort / File(s) Summary
Documentation
.jules/palette.md
New accessibility standards guide documenting best practices for icon-only buttons, requiring Tooltip wrappers for desktop and aria-label attributes for all icon-only interactions.
Provider Wrapper
app/layout.tsx
Wraps main layout content with TooltipProvider to enable tooltip functionality across the application.
Component Accessibility Enhancements
components/chat-panel.tsx, components/header.tsx, components/mobile-icons-bar.tsx
Systematically adds Tooltip components (with TooltipTrigger and TooltipContent) and aria-label attributes to icon-only buttons. Changes are consistent across files: replaces plain buttons with accessible tooltip-wrapped versions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

Review effort 2/5

Poem

🐰 With whiskers twitching, I've seen the light—
Icon buttons now have labels bright!
Tooltips bloom like carrots in a row,
Accessibility makes our UI glow,
No more mystery buttons, hooray! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: standardizing tooltips and accessibility for icon-only buttons across components, which matches the substantive changes in the pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch palette-tooltip-accessibility-7713885870246008838

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 and usage tips.

Copy link

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

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

  • Root-level TooltipProvider is added without explicit configuration; setting a deliberate delay can improve UX consistency.
  • Some tooltip text and aria-label values diverge (e.g., History logo), which can create inconsistent semantics; align them where possible.
Additional notes (3)
  • Maintainability | app/layout.tsx:110-120
    TooltipProvider is introduced at the root without any configuration. Depending on your tooltip implementation (commonly Radix), the provider often supports delayDuration, skipDelayDuration, and similar options. Setting a small, consistent delay can prevent accidental popups during quick cursor passes and reduce visual noise across the app.

  • Readability | components/chat-panel.tsx:222-242
    On desktop, the attachment icon button is only rendered when !isMobile, but the icon size still branches on isMobile ? 18 : 20. In this branch isMobile is always false, so the conditional is dead and adds noise.

  • Maintainability | components/chat-panel.tsx:310-317
    Several tooltip/label strings differ only by capitalization (e.g., Clear attachment vs Attach File). This is minor, but inconsistent casing tends to spread and makes UX feel uneven. Consider standardizing to a single casing style (Title Case or sentence case) for all tooltip content and corresponding labels.

Summary of changes

What changed

✅ Global tooltip enablement

  • Wrapped the app shell with TooltipProvider in app/layout.tsx so tooltips can be used consistently across the UI.

✅ Standardized icon-only button accessibility

  • Replaced legacy title attributes and unlabeled icon buttons with:
    • aria-label for screen reader support
    • Tooltip + TooltipContent for visible labels on desktop

Updated components

  • components/header.tsx: Added tooltips + aria-label to History (logo), Calendar, and Usage icon buttons.
  • components/chat-panel.tsx: Added tooltips + aria-label to New Chat, Attach File, and Clear attachment icon buttons.
  • components/mobile-icons-bar.tsx: Added aria-label to all mobile icon buttons.

Documentation

  • Added .jules/palette.md entry capturing the guideline: icon-only buttons should use Tooltip (desktop) and always include aria-label.

Comment on lines +56 to +69
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon" onClick={toggleHistory} data-testid="logo-history-toggle" aria-label="Toggle history">
<Image
src="/images/logo.svg"
alt="Logo"
width={20}
height={20}
className="h-5 w-auto"
/>
</Button>
</TooltipTrigger>
<TooltipContent>History</TooltipContent>
</Tooltip>

Choose a reason for hiding this comment

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

The tooltip content for the logo button is History, while the aria-label is Toggle history. This mismatch is minor but it can create inconsistent mental models (and makes it harder to keep analytics/testing documentation aligned). Prefer the tooltip text and aria-label to reflect the same action/label unless there's a strong reason to differ.

Suggestion

Align the tooltip label and aria-label so they describe the same control. For example:

<Button
  ...
  aria-label="History"
>
  ...
</Button>
<TooltipContent>History</TooltipContent>

Or, if the intent is explicitly toggling:

aria-label="Toggle history"
...
<TooltipContent>Toggle history</TooltipContent>

Reply with "@CharlieHelps yes please" if you'd like me to add a commit that standardizes these labels across the header.

Comment on lines 51 to 55
<a href="https://buy.stripe.com/14A3cv7K72TR3go14Nasg02" target="_blank" rel="noopener noreferrer">
<Button variant="ghost" size="icon">
<Button variant="ghost" size="icon" aria-label="Purchase Credits">
<TentTree className="h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
</Button>
</a>

Choose a reason for hiding this comment

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

The purchase credits button is wrapped in an <a> with target="_blank", and the inner Button now has an aria-label. Make sure the accessible name is attached to the actual interactive element receiving focus/click events (often the anchor), and avoid nested interactive semantics if your Button renders a <button> by default. If Button renders a <button>, this becomes invalid/awkward semantics inside an <a>.

Suggestion

If Button supports asChild, consider moving the anchor inside the button for correct semantics:

<Button asChild variant="ghost" size="icon" aria-label="Purchase credits">
  <a href="..." target="_blank" rel="noopener noreferrer">
    <TentTree ... />
  </a>
</Button>

Alternatively, add the aria-label to the <a> and ensure the inner component is not a <button>. Reply with "@CharlieHelps yes please" if you'd like me to adjust this safely based on how Button is implemented in this repo.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be08900 and 9d4eac6.

📒 Files selected for processing (5)
  • .jules/palette.md
  • app/layout.tsx
  • components/chat-panel.tsx
  • components/header.tsx
  • components/mobile-icons-bar.tsx
🧰 Additional context used
🧬 Code graph analysis (3)
app/layout.tsx (3)
components/ui/tooltip.tsx (1)
  • TooltipProvider (30-30)
components/header.tsx (1)
  • Header (25-116)
components/history-sidebar.tsx (1)
  • HistorySidebar (15-35)
components/chat-panel.tsx (4)
components/ui/tooltip.tsx (4)
  • Tooltip (30-30)
  • TooltipTrigger (30-30)
  • TooltipContent (30-30)
  • props (17-27)
components/ui/button.tsx (1)
  • Button (56-56)
lib/utils/index.ts (1)
  • cn (10-12)
tests/chat.spec.ts (1)
  • test (4-89)
components/header.tsx (2)
components/ui/tooltip.tsx (4)
  • Tooltip (30-30)
  • TooltipTrigger (30-30)
  • TooltipContent (30-30)
  • props (17-27)
components/history.tsx (1)
  • History (11-26)
🪛 markdownlint-cli2 (0.21.0)
.jules/palette.md

[warning] 1-1: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (3)
app/layout.tsx (1)

113-120: LGTM — TooltipProvider correctly scopes all tooltip-enabled subtrees

Wrapping Header, HistorySidebar, Footer, and children inside TooltipProvider ensures all Tooltip/TooltipTrigger/TooltipContent descendants share a single context. Analytics and SpeedInsights are correctly left outside.

components/header.tsx (1)

108-110: LGTM — mobile Usage button correctly omits Tooltip

aria-label only on the mobile variant is the right pattern; hover tooltips aren't useful on touch devices.

components/chat-panel.tsx (1)

173-188: LGTM — New Chat button Tooltip is correctly structured

aria-label and TooltipContent match exactly; data-testid is preserved for existing tests.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.jules/palette.md:
- Around line 1-3: Change the first heading from a level-2 to a top-level
heading and insert a blank line after it: replace "## 2025-05-23 -
[Standardizing Icon Button Accessibility and Tooltips]" with "# 2025-05-23 -
[Standardizing Icon Button Accessibility and Tooltips]" and add an empty line
between that heading and the following paragraph to satisfy MD041 and MD022 for
the content under the "Standardizing Icon Button Accessibility and Tooltips"
entry.

In `@components/chat-panel.tsx`:
- Around line 310-317: The TooltipContent and aria-label for the
clear-attachment button are using "Clear attachment" (lowercase "a") which is
inconsistent with the attach button's "Attach File"; update the text to match
the file's chosen convention (e.g., change TooltipContent and aria-label in the
Button that calls clearAttachment to "Clear Attachment") so TooltipContent, the
Button's aria-label and any related text use the same capitalization style
across the component.

In `@components/header.tsx`:
- Around line 56-69: The Tooltip/Button pairs use inconsistent accessible names:
align the visible tooltip text (TooltipContent) with the button aria-labels for
consistency; update the Logo/history TooltipContent to match the Button
aria-label "Toggle history" (or change the aria-label to "History") and likewise
make the Calendar pair consistent between "Open Calendar" and "Calendar" so all
TooltipContent strings and Button aria-label values follow the same verb-noun
pattern; locate the elements using Tooltip, TooltipTrigger, Button (the logo's
onClick toggleHistory) and TooltipContent to make the changes.

In `@components/mobile-icons-bar.tsx`:
- Around line 48-50: The Search Button in mobile-icons-bar.tsx is labelled but
has no onClick, causing an accessible control that does nothing; either wire it
to the search-opening handler or remove it until implemented — add an onClick to
the Button (e.g., onClick={props.onOpenSearch} or onClick={() =>
openSearchModal()}), ensure the component accepts/forwards a handler prop (e.g.,
onOpenSearch) if needed, and keep the aria-label and testid intact so keyboard
and screen-reader users activate the real action instead of a no-op.
- Around line 51-55: The anchor and the Button are both focusable, leaving the
outer <a> unlabeled and causing duplicate tab stops; make the anchor the single
interactive element by using the Button’s asChild prop (or otherwise ensuring
only the <a> is focusable) so the accessible name is on the anchor.
Specifically, replace the current <a><Button ... aria-label="Purchase
Credits">...</Button></a> pattern with <Button asChild variant="ghost"
size="icon"><a href="..." target="_blank" rel="noopener noreferrer"
aria-label="Purchase Credits"><TentTree ... /></a></Button>, so the anchor
carries the aria-label and there is only one focusable element.
- Line 62: The History icon usage in MobileIconsBar lacks an aria-label because
the History component doesn't accept or forward one; update the History
component to accept an optional ariaLabel (or aria-label) prop in its props
signature and pass it through to the rendered <Button> (or IconButton) element
(e.g., <Button aria-label={ariaLabel} ...>) so screen readers receive the label;
ensure the prop name matches other icon components and update any internal prop
destructuring in the History component to forward the aria attribute.

Comment on lines +1 to +3
## 2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]
**Learning:** Icon-only buttons without labels or tooltips create "mystery meat navigation" and are inaccessible to screen readers. Standardizing on `Tooltip` for visual labels and `aria-label` for parity ensures a consistent and accessible UX across desktop and mobile.
**Action:** Always wrap new icon-only buttons in `Tooltip` (desktop) and ensure `aria-label` is present for all icon-only interactions.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Markdown linting violations flagged by markdownlint-cli2

Two valid linter warnings apply:

  • MD041: The first line should be a top-level (#) heading; currently uses ##.
  • MD022: A blank line is required after a heading before body content.
♻️ Proposed fix
-## 2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]
-**Learning:** Icon-only buttons without labels or tooltips create "mystery meat navigation" and are inaccessible to screen readers. Standardizing on `Tooltip` for visual labels and `aria-label` for parity ensures a consistent and accessible UX across desktop and mobile.
-**Action:** Always wrap new icon-only buttons in `Tooltip` (desktop) and ensure `aria-label` is present for all icon-only interactions.
+# 2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]
+
+**Learning:** Icon-only buttons without labels or tooltips create "mystery meat navigation" and are inaccessible to screen readers. Standardizing on `Tooltip` for visual labels and `aria-label` for parity ensures a consistent and accessible UX across desktop and mobile.
+**Action:** Always wrap new icon-only buttons in `Tooltip` (desktop) and ensure `aria-label` is present for all icon-only interactions.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]
**Learning:** Icon-only buttons without labels or tooltips create "mystery meat navigation" and are inaccessible to screen readers. Standardizing on `Tooltip` for visual labels and `aria-label` for parity ensures a consistent and accessible UX across desktop and mobile.
**Action:** Always wrap new icon-only buttons in `Tooltip` (desktop) and ensure `aria-label` is present for all icon-only interactions.
# 2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]
**Learning:** Icon-only buttons without labels or tooltips create "mystery meat navigation" and are inaccessible to screen readers. Standardizing on `Tooltip` for visual labels and `aria-label` for parity ensures a consistent and accessible UX across desktop and mobile.
**Action:** Always wrap new icon-only buttons in `Tooltip` (desktop) and ensure `aria-label` is present for all icon-only interactions.
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 1-1: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.jules/palette.md around lines 1 - 3, Change the first heading from a
level-2 to a top-level heading and insert a blank line after it: replace "##
2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]" with "#
2025-05-23 - [Standardizing Icon Button Accessibility and Tooltips]" and add an
empty line between that heading and the following paragraph to satisfy MD041 and
MD022 for the content under the "Standardizing Icon Button Accessibility and
Tooltips" entry.

Comment on lines +310 to +317
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon" onClick={clearAttachment} data-testid="clear-attachment-button" aria-label="Clear attachment">
<X size={16} />
</Button>
</TooltipTrigger>
<TooltipContent>Clear attachment</TooltipContent>
</Tooltip>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Capitalization inconsistency: "Clear attachment" vs "Attach File"

TooltipContent and aria-label for the clear button use "Clear attachment" (lowercase "a") while the attach button uses "Attach File" (title case). Consider aligning to a single convention across all tooltips in this file:

-              <Button ... aria-label="Clear attachment">
+              <Button ... aria-label="Clear Attachment">
...
-              <TooltipContent>Clear attachment</TooltipContent>
+              <TooltipContent>Clear Attachment</TooltipContent>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon" onClick={clearAttachment} data-testid="clear-attachment-button" aria-label="Clear attachment">
<X size={16} />
</Button>
</TooltipTrigger>
<TooltipContent>Clear attachment</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon" onClick={clearAttachment} data-testid="clear-attachment-button" aria-label="Clear Attachment">
<X size={16} />
</Button>
</TooltipTrigger>
<TooltipContent>Clear Attachment</TooltipContent>
</Tooltip>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/chat-panel.tsx` around lines 310 - 317, The TooltipContent and
aria-label for the clear-attachment button are using "Clear attachment"
(lowercase "a") which is inconsistent with the attach button's "Attach File";
update the text to match the file's chosen convention (e.g., change
TooltipContent and aria-label in the Button that calls clearAttachment to "Clear
Attachment") so TooltipContent, the Button's aria-label and any related text use
the same capitalization style across the component.

Comment on lines +56 to +69
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon" onClick={toggleHistory} data-testid="logo-history-toggle" aria-label="Toggle history">
<Image
src="/images/logo.svg"
alt="Logo"
width={20}
height={20}
className="h-5 w-auto"
/>
</Button>
</TooltipTrigger>
<TooltipContent>History</TooltipContent>
</Tooltip>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistent pairing of aria-label and tooltip text

Two of the three wrapped buttons have mismatched accessible names and tooltip labels:

Button aria-label TooltipContent
Logo/history "Toggle history" "History"
Calendar "Open Calendar" "Calendar"
Usage "Usage" "Usage"

WCAG 2.5.3 (Label in Name) requires that the visible label text be present as a substring in the accessible name; both current cases technically satisfy this, but the inconsistency makes the pattern harder to follow and maintain. Recommend either aligning tooltip and aria-label verbatim, or adopting a consistent verb-noun form ("Toggle History", "Open Calendar") across both:

♻️ Proposed alignment
-            <Button ... aria-label="Toggle history">
+            <Button ... aria-label="History">
...
-          <TooltipContent>History</TooltipContent>
+          <TooltipContent>History</TooltipContent>
-            <Button ... aria-label="Open Calendar">
+            <Button ... aria-label="Calendar">
...
-          <TooltipContent>Calendar</TooltipContent>
+          <TooltipContent>Calendar</TooltipContent>

Also applies to: 80-87

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/header.tsx` around lines 56 - 69, The Tooltip/Button pairs use
inconsistent accessible names: align the visible tooltip text (TooltipContent)
with the button aria-labels for consistency; update the Logo/history
TooltipContent to match the Button aria-label "Toggle history" (or change the
aria-label to "History") and likewise make the Calendar pair consistent between
"Open Calendar" and "Calendar" so all TooltipContent strings and Button
aria-label values follow the same verb-noun pattern; locate the elements using
Tooltip, TooltipTrigger, Button (the logo's onClick toggleHistory) and
TooltipContent to make the changes.

Comment on lines +48 to 50
<Button variant="ghost" size="icon" data-testid="mobile-search-button" aria-label="Search">
<Search className="h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
</Button>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Search button is non-functional — labelled but missing onClick

The button has aria-label="Search" but no onClick handler. Keyboard and screen reader users will encounter a reachable control that silently does nothing when activated, which is worse from an accessibility perspective than an unlabelled button that at least fails visually. Either wire up the search handler here or remove the button until the feature is implemented.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/mobile-icons-bar.tsx` around lines 48 - 50, The Search Button in
mobile-icons-bar.tsx is labelled but has no onClick, causing an accessible
control that does nothing; either wire it to the search-opening handler or
remove it until implemented — add an onClick to the Button (e.g.,
onClick={props.onOpenSearch} or onClick={() => openSearchModal()}), ensure the
component accepts/forwards a handler prop (e.g., onOpenSearch) if needed, and
keep the aria-label and testid intact so keyboard and screen-reader users
activate the real action instead of a no-op.

Comment on lines 51 to 55
<a href="https://buy.stripe.com/14A3cv7K72TR3go14Nasg02" target="_blank" rel="noopener noreferrer">
<Button variant="ghost" size="icon">
<Button variant="ghost" size="icon" aria-label="Purchase Credits">
<TentTree className="h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
</Button>
</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

aria-label is on the inner <Button>, not on the wrapping <a> — both elements are focusable

The new aria-label="Purchase Credits" is on the <button> element rendered by <Button>, but the outer <a> is also a focusable landmark with no label. Some assistive technology + browser combinations will tab-stop on both elements separately. The idiomatic fix is to use the anchor itself as the interactive element (e.g., via Button with asChild wrapping an <a>) so there is a single focusable node:

♻️ Suggested structure
-      <a href="https://buy.stripe.com/14A3cv7K72TR3go14Nasg02" target="_blank" rel="noopener noreferrer">
-        <Button variant="ghost" size="icon" aria-label="Purchase Credits">
-          <TentTree className="h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
-        </Button>
-      </a>
+      <Button variant="ghost" size="icon" aria-label="Purchase Credits" asChild>
+        <a href="https://buy.stripe.com/14A3cv7K72TR3go14Nasg02" target="_blank" rel="noopener noreferrer">
+          <TentTree className="h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
+        </a>
+      </Button>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/mobile-icons-bar.tsx` around lines 51 - 55, The anchor and the
Button are both focusable, leaving the outer <a> unlabeled and causing duplicate
tab stops; make the anchor the single interactive element by using the Button’s
asChild prop (or otherwise ensuring only the <a> is focusable) so the accessible
name is on the anchor. Specifically, replace the current <a><Button ...
aria-label="Purchase Credits">...</Button></a> pattern with <Button asChild
variant="ghost" size="icon"><a href="..." target="_blank" rel="noopener
noreferrer" aria-label="Purchase Credits"><TentTree ... /></a></Button>, so the
anchor carries the aria-label and there is only one focusable element.

<Button variant="ghost" size="icon" data-testid="mobile-submit-button" onClick={onSubmitClick} aria-label="Send Message">
<ArrowRight className="h-[1.2rem] w-[1.2rem] transition-all rotate-0 scale-100" />
</Button>
<History location="header" />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, confirm History component has no aria-label or role annotation
echo "=== Checking for aria-label in History-related files ==="
rg -n "aria-label" components/history.tsx components/history-container.tsx 2>/dev/null || echo "No aria-label found"
echo ""
echo "=== Examining History component structure ==="
cat -n components/history.tsx | head -100

Repository: QueueLab/QCX

Length of output: 1045


🏁 Script executed:

#!/bin/bash
# Check the mobile-icons-bar.tsx file to see other buttons and their aria-labels
echo "=== Mobile Icons Bar - checking icon buttons structure ==="
cat -n components/mobile-icons-bar.tsx

Repository: QueueLab/QCX

Length of output: 3176


🏁 Script executed:

#!/bin/bash
# Check HistoryContainer implementation
echo "=== History Container ==="
cat -n components/history-container.tsx

Repository: QueueLab/QCX

Length of output: 538


Add aria-label support to the History component

The History component renders a <Button> icon with no aria-label prop support. Every other icon button in MobileIconsBar has an aria-label, but the History button at line 62 is missing one. Update the History component to accept and apply an aria-label prop to make it accessible to screen readers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/mobile-icons-bar.tsx` at line 62, The History icon usage in
MobileIconsBar lacks an aria-label because the History component doesn't accept
or forward one; update the History component to accept an optional ariaLabel (or
aria-label) prop in its props signature and pass it through to the rendered
<Button> (or IconButton) element (e.g., <Button aria-label={ariaLabel} ...>) so
screen readers receive the label; ensure the prop name matches other icon
components and update any internal prop destructuring in the History component
to forward the aria attribute.

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