Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Check,
Clipboard,
ExternalLink,
Info,
} from 'lucide-react'
import { useParams } from 'next/navigation'
import { Button, Input, Label, Tooltip } from '@/components/emcn/components'
Expand Down Expand Up @@ -249,14 +250,26 @@ const renderLabel = (
<Label className='flex items-baseline gap-1.5 whitespace-nowrap'>
{config.title}
{required && <span className='ml-0.5'>*</span>}
{config.tooltip && (
<Tooltip.Root>
<Tooltip.Trigger asChild>
<span className='inline-flex' tabIndex={0} role='button'>
<Info className='h-3 w-3 flex-shrink-0 cursor-pointer text-muted-foreground' />
</span>
Comment on lines +255 to +258
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.

P2 Tooltip trigger not keyboard-accessible

The <span> wrapping the Info icon has no tabIndex, so keyboard-only users cannot focus it to trigger the tooltip. Adding tabIndex={0} (and a matching role) makes it reachable via Tab. Note: the existing AlertTriangle trigger below uses the same pattern, so this affects both.

Suggested change
<Tooltip.Trigger asChild>
<span className='inline-flex'>
<Info className='h-3 w-3 flex-shrink-0 cursor-pointer text-muted-foreground' />
</span>
<span className='inline-flex' tabIndex={0} role='button'>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in:

  • e2b2206 — added tabIndex={0} and role='button' to the Info tooltip trigger
  • 4891982 — also applied the same fix to the existing AlertTriangle trigger as noted

</Tooltip.Trigger>
<Tooltip.Content side='top'>
<p>{config.tooltip}</p>
</Tooltip.Content>
</Tooltip.Root>
)}
{labelSuffix}
{config.type === 'code' &&
config.language === 'json' &&
!isValidJson &&
!wandState?.isStreaming && (
<Tooltip.Root>
<Tooltip.Trigger asChild>
<span className='inline-flex'>
<span className='inline-flex' tabIndex={0} role='button'>
<AlertTriangle className='h-3 w-3 flex-shrink-0 cursor-pointer text-destructive' />
</span>
</Tooltip.Trigger>
Expand Down
Loading