From c938273398e0ca53aa1458466f50c136850e540e Mon Sep 17 00:00:00 2001 From: mkepes Date: Sat, 16 Nov 2024 15:48:31 +0100 Subject: [PATCH] Accessibility fix #52 --- lib/l10n/app_localizations.dart | 6 ++++++ lib/l10n/app_localizations_sk.dart | 3 +++ lib/l10n/app_sk.arb | 1 + lib/ui/screens/preview_document_screen.dart | 17 ++++++++++------- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index df24d66..cc4e2f6 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -253,6 +253,12 @@ abstract class AppLocalizations { /// **'Zdieľať náhľad dokumentu'** String get shareDocumentPreviewSemantics; + /// No description provided for @previewDocumentSemantics. + /// + /// In sk, this message translates to: + /// **'Náhľad dokumentu'** + String get previewDocumentSemantics; + /// No description provided for @deepLinkParseErrorMessage. /// /// In sk, this message translates to: diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index 20366d2..8e2428f 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -89,6 +89,9 @@ class AppLocalizationsSk extends AppLocalizations { @override String get shareDocumentPreviewSemantics => 'Zdieľať náhľad dokumentu'; + @override + String get previewDocumentSemantics => 'Náhľad dokumentu'; + @override String deepLinkParseErrorMessage(Object error) { return 'Nepodporovaný alebo nesprávny odkaz:\n$error'; diff --git a/lib/l10n/app_sk.arb b/lib/l10n/app_sk.arb index da885f7..f94f41c 100644 --- a/lib/l10n/app_sk.arb +++ b/lib/l10n/app_sk.arb @@ -28,6 +28,7 @@ "qrCodeScannerBackSemantics": "Späť", "qrCodeScannerOpenSemantics": "Podpísať vzdialený dokument pomocou QR kódu", "shareDocumentPreviewSemantics": "Zdieľať náhľad dokumentu", + "previewDocumentSemantics": "Náhľad dokumentu", "deepLinkParseErrorMessage": "Nepodporovaný alebo nesprávny odkaz:\n{error}", "stepIndicatorText": "Krok {stepNumber} z {totalSteps}", diff --git a/lib/ui/screens/preview_document_screen.dart b/lib/ui/screens/preview_document_screen.dart index c4f7df2..2e6dad6 100644 --- a/lib/ui/screens/preview_document_screen.dart +++ b/lib/ui/screens/preview_document_screen.dart @@ -153,13 +153,16 @@ class _SuccessContent extends StatelessWidget { Expanded( child: Padding( padding: const EdgeInsets.only(bottom: 16), - child: DottedBorder( - color: dashColor, - strokeWidth: 4, - dashPattern: const [16, 16], - padding: const EdgeInsets.all(2), - child: DocumentVisualization( - visualization: visualization, + child: Semantics( + label: context.strings.previewDocumentSemantics, + child: DottedBorder( + color: dashColor, + strokeWidth: 4, + dashPattern: const [16, 16], + padding: const EdgeInsets.all(2), + child: DocumentVisualization( + visualization: visualization, + ), ), ), ),