Skip to content

Commit a1d2112

Browse files
committed
Merge branch 'PVW-1487-talkback-voiceover-test-findings-part-2' into 'main'
PVW-1487: Improve accessibility using Talkback/Voiceover (part 2) See merge request wallet/nl-wallet!420
2 parents de6ac0e + 884e93e commit a1d2112

File tree

7 files changed

+53
-8
lines changed

7 files changed

+53
-8
lines changed

wallet_app/lib/l10n/intl_en.arb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "en",
3-
"@@last_modified": "2023-10-19T09:09:41+02:00",
3+
"@@last_modified": "2023-10-23T09:19:02+02:00",
44
"aboutScreenDescription": "This demo is realized by multiple parties and was commissioned by the dutch government. For more information see edi.pleio.nl.",
55
"aboutScreenPrivacyCta": "Privacy policy",
66
"aboutScreenTermsCta": "Terms and conditions",
@@ -853,6 +853,19 @@
853853
"pinBlockedScreenHeadline": "Your app has been blocked",
854854
"pinBlockedScreenResetWalletCta": "Reset wallet",
855855
"pinBlockedScreenTitle": "App blocked",
856+
"pinFieldSemanticsLabel": "Access code field, {enteredDigits} of {totalDigits} entered, secured text field.",
857+
"@pinFieldSemanticsLabel": {
858+
"placeholders": {
859+
"enteredDigits": {
860+
"example": "3",
861+
"type": "int"
862+
},
863+
"totalDigits": {
864+
"example": "6",
865+
"type": "int"
866+
}
867+
}
868+
},
856869
"pinKeyboardWCAGBackspaceLabel": "backspace",
857870
"pinKeyboardWCAGDigitKeyTapHint": "select",
858871
"pinScreenAboutAppTooltip": "About the app",
@@ -933,6 +946,7 @@
933946
"qrMyCodeTabHowToSheetDescription": "Have a reviewer scan My QR Code to start sharing. You will then receive a data request. Data will only be shared if you agree to the request.",
934947
"qrMyCodeTabHowToSheetTitle": "How does my QR-code work?",
935948
"qrScanTabCameraScanningQrScannedAnnouncement": "QR code scanned",
949+
"qrScanTabCameraScanningQrScanningAnnouncement": "Point your camera at a QR code",
936950
"qrScanTabContinueCta": "Scan another QR-code",
937951
"qrScanTabErrorRetryCta": "Retry",
938952
"qrScanTabFlashDisableCtaTooltip": "Turn flashlight off",

wallet_app/lib/l10n/intl_nl.arb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "nl",
3-
"@@last_modified": "2023-10-19T09:09:41+02:00",
3+
"@@last_modified": "2023-10-23T09:19:02+02:00",
44
"aboutScreenDescription": "Deze demo app is tot stand gekomen door een samenwerking van verschillende partijen in opdracht van de Nederlandse Overheid. Voor meer informatie over deze app verwijzen we naar de website edi.pleio.nl.",
55
"aboutScreenPrivacyCta": "Privacybeleid",
66
"aboutScreenTermsCta": "Gebruiksvoorwaarden",
@@ -853,6 +853,19 @@
853853
"pinBlockedScreenHeadline": "Je app is geblokkeerd",
854854
"pinBlockedScreenResetWalletCta": "Wallet wissen",
855855
"pinBlockedScreenTitle": "Geblokkeerd",
856+
"pinFieldSemanticsLabel": "Toegangscode veld, {enteredDigits} van {totalDigits} ingevoerd, beveiligd tekstveld",
857+
"@pinFieldSemanticsLabel": {
858+
"placeholders": {
859+
"enteredDigits": {
860+
"example": "3",
861+
"type": "int"
862+
},
863+
"totalDigits": {
864+
"example": "6",
865+
"type": "int"
866+
}
867+
}
868+
},
856869
"pinKeyboardWCAGBackspaceLabel": "backspace",
857870
"pinKeyboardWCAGDigitKeyTapHint": "invoer",
858871
"pinScreenAboutAppTooltip": "Over de app",
@@ -933,6 +946,7 @@
933946
"qrMyCodeTabHowToSheetDescription": "Laat Mijn QR-code scannen door een controleur om te beginnen met delen. Vervolgens krijg je een gegevens verzoek. Alleen als je akkoord gaat met het verzoek zullen gegevens worden gedeeld.",
934947
"qrMyCodeTabHowToSheetTitle": "Hoe werkt mijn QR-code?",
935948
"qrScanTabCameraScanningQrScannedAnnouncement": "QR-code gescand",
949+
"qrScanTabCameraScanningQrScanningAnnouncement": "Richt je camera op een QR-code",
936950
"qrScanTabContinueCta": "Nog een QR scannen",
937951
"qrScanTabErrorRetryCta": "Probeer opnieuw",
938952
"qrScanTabFlashDisableCtaTooltip": "Zet zaklamp uit",

wallet_app/lib/src/data/repository/issuance/mock/mock_issuance_response_repository.mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const _kMockPidDataAttributes = [
164164
),
165165
DataAttribute(
166166
valueType: AttributeValueType.text,
167-
label: 'Geboortenaam',
167+
label: 'Naam bij geboorte',
168168
value: 'Molenaar',
169169
key: 'mock.birthName',
170170
sourceCardId: _kPidId,

wallet_app/lib/src/feature/lock/auto_lock_observer.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import 'dart:async';
2+
import 'dart:ui';
23

34
import 'package:fimber/fimber.dart';
45
import 'package:flutter/material.dart';
6+
import 'package:flutter/semantics.dart';
57
import 'package:flutter_bloc/flutter_bloc.dart';
68
import 'package:rxdart/rxdart.dart';
79

@@ -39,15 +41,25 @@ class _AutoLockObserverState extends State<AutoLockObserver> with WidgetsBinding
3941
@override
4042
void initState() {
4143
super.initState();
42-
WidgetsBinding.instance.addObserver(this);
44+
4345
_setupNoInteractionListener();
46+
_setupSemanticActionListener();
47+
48+
WidgetsBinding.instance.addObserver(this);
4449
if (WidgetsBinding.instance.lifecycleState != AppLifecycleState.resumed) {
4550
_lockWallet();
4651
} else {
4752
_resetIdleTimeout();
4853
}
4954
}
5055

56+
void _setupSemanticActionListener() {
57+
PlatformDispatcher.instance.onSemanticsActionEvent = (SemanticsActionEvent event) {
58+
if (event.type != SemanticsAction.didLoseAccessibilityFocus) _resetIdleTimeout();
59+
WidgetsBinding.instance.performSemanticsAction(event);
60+
};
61+
}
62+
5163
void _setupNoInteractionListener() {
5264
_inactiveSubscription?.cancel();
5365
_inactiveSubscription =

wallet_app/lib/src/feature/pin/widget/pin_field.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class _PinFieldState extends State<PinField> with TickerProviderStateMixin {
8080
@override
8181
Widget build(BuildContext context) {
8282
return Semantics(
83-
label: context.l10n.setupSecurityScreenWCAGEnteredDigitsAnnouncement(widget.enteredDigits, widget.digits),
83+
label: context.l10n.pinFieldSemanticsLabel(widget.enteredDigits, widget.digits),
8484
child: Transform.translate(
8585
offset: _calcShakeOffset(),
8686
child: Row(

wallet_app/lib/src/feature/qr/tab/qr_scan/qr_scan_tab.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ class QrScanTab extends StatelessWidget {
3939
children: [
4040
BlocListener<QrScanBloc, QrScanState>(
4141
listener: (context, state) {
42-
if (state is QrScanSuccess) {
43-
SemanticsService.announce(context.l10n.qrScanTabCameraScanningQrScannedAnnouncement, TextDirection.ltr);
42+
final String? announcement = switch (state) {
43+
QrScanScanning() => context.l10n.qrScanTabCameraScanningQrScanningAnnouncement,
44+
QrScanSuccess() => context.l10n.qrScanTabCameraScanningQrScanningAnnouncement,
45+
_ => null,
46+
};
47+
if (announcement != null) {
48+
SemanticsService.announce(announcement, TextDirection.ltr);
4449
}
4550
},
4651
child: BlocBuilder<QrScanBloc, QrScanState>(

wallet_app/test/src/feature/wallet/personalize/wallet_personalize_screen_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void main() {
5050
),
5151
DataAttribute(
5252
valueType: AttributeValueType.text,
53-
label: 'Geboortenaam',
53+
label: 'Naam bij geboorte',
5454
value: 'John',
5555
key: 'mock.birthName',
5656
sourceCardId: kPidId,

0 commit comments

Comments
 (0)