Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
fix(frontend): satisfy Radix dialog a11y requirements on sheets
Sergey Kozyrenkoa6f386c5d79c
diff --git a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsxindex 08704676..e5a95040 100644--- a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx+++ b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.tsx@@ -241,6 +241,10 @@ export function DetailNavigationSheet<T>({open={open}><SheetContent+ // Radix expects either a `<Description>` or an explicit+ // `aria-describedby={undefined}` opt-out. The sheet is just a+ // listbox of items, the `SheetTitle` already describes it.+ aria-describedby={undefined}className="flex w-full max-w-sm flex-col gap-0 p-0 sm:max-w-sm"side="right">diff --git a/frontend/src/pages/templates/template.tsx b/frontend/src/pages/templates/template.tsxindex c62a1c2c..7faff38b 100644--- a/frontend/src/pages/templates/template.tsx+++ b/frontend/src/pages/templates/template.tsx@@ -37,7 +37,7 @@ import { Form, FormControl, FormField, FormItem } from '@/components/ui/form';import { Input } from '@/components/ui/input';import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupTextareaAutosize } from '@/components/ui/input-group';import { Separator } from '@/components/ui/separator';-import { Sheet, SheetContent } from '@/components/ui/sheet';+import { Sheet, SheetContent, SheetTitle } from '@/components/ui/sheet';import { SidebarTrigger } from '@/components/ui/sidebar';import { Spinner } from '@/components/ui/spinner';import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';@@ -263,9 +263,7 @@ const Template = () => {return;}- const target = mobileNav.filteredItems.find(- (item) => String(templateToolbarProps.getId(item)) === id,- );+ const target = mobileNav.filteredItems.find((item) => String(templateToolbarProps.getId(item)) === id);if (!target) {return;@@ -461,7 +459,7 @@ const Template = () => {{isEditingTitle && canShowActions ? (<InlineEditInputbusy={isRenaming}- className="w-64 min-w-0 max-w-full flex-1"+ className="w-64 max-w-full min-w-0 flex-1"defaultValue={templateName ?? ''}inputRef={editingInputRef}onCancel={handleTemplateRenameCancel}@@ -472,7 +470,7 @@ const Template = () => {<Tooltip><TooltipTrigger asChild><BreadcrumbPage- className="min-w-0 cursor-text select-none truncate"+ className="min-w-0 cursor-text truncate select-none"onDoubleClick={handleTemplateRenameStart}>{templateName ?? 'Template'}@@ -671,9 +669,20 @@ const Template = () => {open={isAsideOpen}><SheetContent- className="w-full max-w-[min(20rem,100vw)]"+ // Radix expects either a `<Description>` or an+ // explicit `aria-describedby={undefined}` opt-out;+ // the panel is a simple list of presets with no+ // descriptive sub-text, so the opt-out is honest.+ aria-describedby={undefined}+ className="w-full max-w-[min(20rem,100vw)] p-2"side="right">+ {/* Radix dialogs require a title for screen readers.+ The visible h3 lives inside `asideContent` and is+ reused on desktop, where Sheet doesn't render — so+ mirror it here as an sr-only SheetTitle that only+ assistive tech picks up. */}+ <SheetTitle className="sr-only">Preset templates</SheetTitle>{asideContent}</SheetContent></Sheet>