Skip to content

Commit

Permalink
Accessibility fix #52
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkepes committed Nov 16, 2024
1 parent bf08e11 commit c938273
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions lib/l10n/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions lib/l10n/app_localizations_sk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_sk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
17 changes: 10 additions & 7 deletions lib/ui/screens/preview_document_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
),
),
),
Expand Down

0 comments on commit c938273

Please sign in to comment.