Use DialogDescription component for description

- Remove aria-describedby attribute
This commit is contained in:
yangdx
2025-04-14 12:45:42 +08:00
parent c834570cfc
commit 414264f25e

View File

@@ -5,10 +5,10 @@ import {
DialogContent, DialogContent,
DialogHeader, DialogHeader,
DialogTitle, DialogTitle,
DialogFooter DialogFooter,
DialogDescription
} from '@/components/ui/Dialog' } from '@/components/ui/Dialog'
import Button from '@/components/ui/Button' import Button from '@/components/ui/Button'
import Input from '@/components/ui/Input'
interface PropertyEditDialogProps { interface PropertyEditDialogProps {
isOpen: boolean isOpen: boolean
@@ -57,16 +57,16 @@ const PropertyEditDialog = ({
return ( return (
<Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}> <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
<DialogContent className="sm:max-w-md" aria-describedby="property-edit-description"> <DialogContent className="sm:max-w-md">
<DialogHeader> <DialogHeader>
<DialogTitle> <DialogTitle>
{t('graphPanel.propertiesView.editProperty', { {t('graphPanel.propertiesView.editProperty', {
property: getPropertyNameTranslation(propertyName) property: getPropertyNameTranslation(propertyName)
})} })}
</DialogTitle> </DialogTitle>
<p id="property-edit-description" className="text-sm text-muted-foreground"> <DialogDescription>
{t('graphPanel.propertiesView.editPropertyDescription')} {t('graphPanel.propertiesView.editPropertyDescription')}
</p> </DialogDescription>
</DialogHeader> </DialogHeader>
{/* Multi-line text input using textarea */} {/* Multi-line text input using textarea */}