[codex] fix: restore pending input keyboard activation#3501
Conversation
Co-authored-by: Codex <codex@openai.com>
…t-option-keyboard [codex] fix: restore pending input keyboard activation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Approved This change converts a div acting as a button to a proper semantic button element, improving accessibility without changing functionality. The native disabled attribute replaces manual click handling. You can customize Macroscope's approvability policy. Learn more. |
Summary
buttonelements.type="button".Root cause
The option rows used focusable
div role="button"elements. They supported pointer selection and number-key shortcuts, but did not get browser-native Enter/Space activation when focused.Impact
Focused pending input options now use native button activation while preserving the existing pointer and number-key behavior.
Validation
PATH="$HOME/.vite-plus/bin:$PATH" vp check(0 errors; 20 existing unrelated warnings)PATH="$HOME/.vite-plus/bin:$PATH" vp run typecheck(completed successfully)Note
Low Risk
Small UI/accessibility change in the chat composer with no auth, data, or API impact.
Overview
Pending user input option rows in
ComposerPendingUserInputPanelare now real<button type="button">elements instead of focusablediv role="button"wrappers.Disabled state uses the native
disabledattribute (replacingaria-disabledand an early return inonClick), so focused options get standard Enter/Space activation while pointer clicks, styling, shortcuts, andtype="button"inside the composer stay the same.Reviewed by Cursor Bugbot for commit c09bc6a. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix keyboard activation for pending input options in chat composer
Replaces the
<div role="button">wrapper for each option inComposerPendingUserInputCardwith a native<button type="button">. Thedisabledattribute now controls focusability and click suppression whenisRespondingis true, removing the need for manualtabIndex,aria-disabled, andonClickguard logic.Macroscope summarized c09bc6a.