Skip to content

fix(a11y): make Ask AI button keyboard-focusable in search bar#17352

Draft
sentry-junior[bot] wants to merge 1 commit intomasterfrom
fix/ask-ai-keyboard-accessibility
Draft

fix(a11y): make Ask AI button keyboard-focusable in search bar#17352
sentry-junior[bot] wants to merge 1 commit intomasterfrom
fix/ask-ai-keyboard-accessibility

Conversation

@sentry-junior
Copy link
Copy Markdown
Contributor

@sentry-junior sentry-junior bot commented Apr 15, 2026

Summary

The "Ask AI" control in the search bar was rendered as a styled <div> via Radix's Button asChild pattern. Because asChild renders the child element (the <div>) instead of a native <button>, the control is excluded from the tab order and inaccessible to keyboard and assistive tech users.

Changes

In src/components/search/index.tsx:

  • Remove asChild prop from the Button wrapping the Ask AI control
  • Remove the inner wrapping <div>
  • Add aria-label="Ask AI" for screen reader clarity

The Button now renders as a native <button> element, which is keyboard-focusable and tab-navigable by default.

Note: header.tsx already uses a proper <button> with kapa-ai-class and aria-label—this PR aligns the search bar variant to the same pattern.

Closes #17351

The 'Ask AI' control in the search bar was rendered as a styled <div>
via Radix's Button  pattern, which removes it from the tab
order and makes it inaccessible to keyboard and assistive tech users.

Remove  and the wrapping <div> so Button renders as a native
<button> element. Add aria-label="Ask AI" for screen reader clarity.

Fixes #17351
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Apr 15, 2026 4:15pm
sentry-docs Ready Ready Preview, Comment Apr 15, 2026 4:15pm

Request Review

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.

Ask AI control is not keyboard-focusable (div instead of button)

0 participants