Cw 355 more talkback unlabeled (#913)

* feat(Talkback): make add contact button labeled

* feat(Talkback): add labeled semantics to cakepay buttons

- Use BasePage's default labeled back button instead of override
- Add filter button semantics
- Add ExcludeSemantics to search icon because it was messing with the whole search input box semantics and making it sound like an unlabeled button
- Add profile button label

* feat(Talkback): add labeled semantics to send page buttons

- Add semantics label to Paste button
- Add semantics label to Scan button
- Add semantics label to Address Book button

* fix: use i18n strings instead of hardcoded semantics labels and add missing 'profile' string

* fix: also add localization to back button on base page

* fix(Talkback): add the rest of localized strings & add missing close string

* fix: pt strings

* feat: add correct strings using translate script

* Update strings_yo.arb [skip ci]

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Rafael Saes
2023-07-12 00:21:59 +03:00
committed by GitHub
co-authored by Omar Hatem
parent 02fd12f5f8
commit d5642fa0ff
38 changed files with 348 additions and 195 deletions
+74 -57
View File
@@ -114,55 +114,66 @@ class AddressTextField extends StatelessWidget {
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _pasteAddress(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme!
child: Semantics(
label: S.of(context).paste,
child: InkWell(
onTap: () async => _pasteAddress(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme
!
.titleLarge!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/paste_ios.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/paste_ios.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme
!
.headlineMedium!
.decorationColor!,
)),
.decorationColor!,
)),
),
)),
],
if (this.options.contains(AddressTextFieldOption.qrCode) && DeviceInfo.instance.isMobile)
...[
if (this.options.contains(AddressTextFieldOption.qrCode) &&
DeviceInfo.instance.isMobile) ...[
Container(
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presentQRScanner(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme
child: Semantics(
label: S.of(context).scan_qr_code,
child: InkWell(
onTap: () async => _presentQRScanner(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme
.titleLarge!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/qr_code_icon.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme!.headlineMedium!
.decorationColor!,
)),
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/qr_code_icon.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme
!.headlineMedium!
.decorationColor!,
)),
),
))
] else SizedBox(width: 5),
] else
SizedBox(width: 5),
if (this
.options
.contains(AddressTextFieldOption.addressBook)) ...[
@@ -170,26 +181,32 @@ class AddressTextField extends StatelessWidget {
width: prefixIconWidth,
height: prefixIconHeight,
padding: EdgeInsets.only(top: 0),
child: InkWell(
onTap: () async => _presetAddressBookPicker(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme!
child: Semantics(
label: S.of(context).address_book,
child: InkWell(
onTap: () async =>
_presetAddressBookPicker(context),
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme
!
.titleLarge!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/open_book.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
'assets/images/open_book.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme
!
.headlineMedium!
.decorationColor!,
)),
.decorationColor!,
)),
),
))
]
],
+2 -1
View File
@@ -1,6 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/generated/i18n.dart';
class IntroducingCard extends StatelessWidget {
IntroducingCard(
@@ -70,7 +71,7 @@ class IntroducingCard extends StatelessWidget {
Padding(
padding: const EdgeInsets.fromLTRB(0,16,16,0),
child: Semantics(
label: 'Close',
label: S.of(context).close,
child: GestureDetector(
onTap: closeCard,
child: Container(