Skip to content

Commit e5f861a

Browse files
committed
chore: fixes for radix ui warnings
1 parent d345dfb commit e5f861a

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

dashboard/src/components/dialogs/GroupModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
1+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'
22
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'
33
import { Input } from '@/components/ui/input'
44
import { Button } from '@/components/ui/button'
@@ -77,6 +77,9 @@ export default function GroupModal({ isDialogOpen, onOpenChange, form, editingGr
7777
<DialogContent onOpenAutoFocus={e => e.preventDefault()}>
7878
<DialogHeader>
7979
<DialogTitle className={cn(dir === 'rtl' && 'text-right')}>{editingGroup ? t('editGroup', { defaultValue: 'Edit Group' }) : t('createGroup')}</DialogTitle>
80+
<DialogDescription className='sr-only'>
81+
Modify the group settings below
82+
</DialogDescription>
8083
</DialogHeader>
8184
<Form {...form}>
8285
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-4">

dashboard/src/components/dialogs/HostModal.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/
22
import { Badge } from '@/components/ui/badge'
33
import { Button } from '@/components/ui/button'
44
import { Checkbox } from '@/components/ui/checkbox'
5-
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
5+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog'
66
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'
77
import { Input } from '@/components/ui/input'
88
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
@@ -610,7 +610,10 @@ const HostModal: React.FC<HostModalProps> = ({ isDialogOpen, onOpenChange, onSub
610610
<Dialog open={isDialogOpen} onOpenChange={handleModalOpenChange}>
611611
<DialogContent className="h-full w-full max-w-2xl sm:max-h-[95dvh] sm:py-4" onOpenAutoFocus={e => e.preventDefault()}>
612612
<DialogHeader>
613-
<DialogTitle className={cn(dir === 'rtl' ? 'text-right' : 'text-left')}>{editingHost ? t('editHost.title') : t('hostsDialog.addHost')}</DialogTitle>
613+
<DialogTitle className={cn("mt-2",dir === 'rtl' ? 'text-right' : 'text-left')}>{editingHost ? t('editHost.title') : t('hostsDialog.addHost')}</DialogTitle>
614+
<DialogDescription className='sr-only'>
615+
Modify the host settings below
616+
</DialogDescription>
614617
</DialogHeader>
615618
<Form {...form}>
616619
<form onSubmit={form.handleSubmit(handleSubmit)} className="space-y-4">

dashboard/src/components/ui/sidebar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as React from 'react'
66
import { Button } from '@/components/ui/button'
77
import { Input } from '@/components/ui/input'
88
import { Separator } from '@/components/ui/separator'
9-
import { Sheet, SheetContent, SheetTitle } from '@/components/ui/sheet'
9+
import { Sheet, SheetContent, SheetDescription, SheetTitle } from '@/components/ui/sheet'
1010
import { Skeleton } from '@/components/ui/skeleton'
1111
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
1212
import { useIsMobile } from '@/hooks/use-mobile'
@@ -203,6 +203,7 @@ const Sidebar = React.forwardRef<
203203
side={side}
204204
>
205205
<SheetTitle className="sr-only">Navigation Menu</SheetTitle>
206+
<SheetDescription className="sr-only">Main navigation menu for the application</SheetDescription>
206207
<div className="flex h-full w-full flex-col">{children}</div>
207208
</SheetContent>
208209
</Sheet>

0 commit comments

Comments
 (0)