mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
fix(a11y): Enter and Space on a tool call's Allow and Deny buttons answer the request (#33404)
This commit is contained in:
@@ -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}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user