From 5dca131e3d096afa27bcec039a16b80b35d2776f Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Mon, 9 Mar 2026 18:50:00 -0700 Subject: [PATCH] chore: improve accessibility in PermissionsEditor by replacing buttons with divs and adding keyboard navigation support --- .../components/settings/roles-manager.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/surfsense_web/components/settings/roles-manager.tsx b/surfsense_web/components/settings/roles-manager.tsx index f448c76d0..b56de97bd 100644 --- a/surfsense_web/components/settings/roles-manager.tsx +++ b/surfsense_web/components/settings/roles-manager.tsx @@ -695,10 +695,12 @@ function PermissionsEditor({ return (
- +
{isExpanded && ( onTogglePermission(perm.value)} + onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); onTogglePermission(perm.value); } }} >
{actionLabel} @@ -773,7 +777,7 @@ function PermissionsEditor({ onClick={(e) => e.stopPropagation()} className="shrink-0" /> - +
); })}