diff --git a/CHANGELOG.md b/CHANGELOG.md index b625b112..4941df6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to - ♿️(frontend) fix more options menu feedback for screen readers #2071 - ♿(frontend) focus skip link on headings and skip grid dropzone #1983 - ♿️(frontend) fix search modal accessibility issues #2054 +- ♿️(frontend) add sr-only format to export download button #2088 ## [v4.8.2] - 2026-03-19 diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx index 301a919d..8b22f1eb 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-export/components/ModalExport.tsx @@ -60,6 +60,23 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => { const { untitledDocument } = useTrans(); const mediaUrl = useMediaUrl(); + const formatOptions = [ + { label: t('PDF'), value: DocDownloadFormat.PDF }, + { label: t('Docx'), value: DocDownloadFormat.DOCX }, + { label: t('ODT'), value: DocDownloadFormat.ODT }, + { label: t('HTML'), value: DocDownloadFormat.HTML }, + { label: t('Print'), value: DocDownloadFormat.PRINT }, + ]; + + const formatLabels = Object.fromEntries( + formatOptions.map((opt) => [opt.value, opt.label]), + ); + + const downloadButtonAriaLabel = + format === DocDownloadFormat.PRINT + ? t('Print') + : t('Download {{format}}', { format: formatLabels[format] }); + async function onSubmit() { if (!editor) { toast(t('The export failed'), VariantType.ERROR); @@ -211,9 +228,7 @@ export const ModalExport = ({ onClose, doc }: ModalExportProps) => {