feat(accessibility): add screen reader text for pipeline status dialog

This commit is contained in:
yangdx
2025-03-26 14:40:54 +08:00
parent af3c9f30dc
commit 4adfcdc8fe

View File

@@ -8,6 +8,7 @@ import {
AlertDialogContent, AlertDialogContent,
AlertDialogHeader, AlertDialogHeader,
AlertDialogTitle, AlertDialogTitle,
AlertDialogDescription,
AlertDialogOverlay, AlertDialogOverlay,
} from '@/components/ui/AlertDialog' } from '@/components/ui/AlertDialog'
import Button from '@/components/ui/Button' import Button from '@/components/ui/Button'
@@ -121,6 +122,12 @@ export default function PipelineStatusDialog({
position === 'right' && '!right-4 !left-auto !translate-x-0' position === 'right' && '!right-4 !left-auto !translate-x-0'
)} )}
> >
<AlertDialogDescription className="sr-only">
{status?.job_name
? `${t('documentPanel.pipelineStatus.jobName')}: ${status.job_name}, ${t('documentPanel.pipelineStatus.progress')}: ${status.cur_batch}/${status.batchs}`
: t('documentPanel.pipelineStatus.noActiveJob')
}
</AlertDialogDescription>
<AlertDialogHeader className="flex flex-row items-center justify-between"> <AlertDialogHeader className="flex flex-row items-center justify-between">
<AlertDialogTitle> <AlertDialogTitle>
{t('documentPanel.pipelineStatus.title')} {t('documentPanel.pipelineStatus.title')}