fix(a11y): Enter and Space on a tool call's Allow and Deny buttons answer the request (#33404)

This commit is contained in:
G30
2026-10-31 04:57:44 +09:00
committed by GitHub
parent 13bede8ba6
commit 271b00d7ee
@@ -165,6 +165,7 @@
};
const toggleOpenOnKeydown = (event: KeyboardEvent) => {
if (event.target !== event.currentTarget) return;
if (event.key !== 'Enter' && event.key !== ' ') {
return;
}
@@ -204,6 +205,7 @@
class="{buttonClassName} w-full min-w-0 cursor-pointer"
role="button"
tabindex="0"
aria-expanded={open}
on:click={toggleOpen}
on:keydown={toggleOpenOnKeydown}
>