Accessibility fixes (#1128)

wow-support
Serhii 9 months ago committed by GitHub
parent 2a3b5644d7
commit 8889f09509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -99,6 +99,8 @@ class AddressPage extends BasePage {
Widget? trailing(BuildContext context) { Widget? trailing(BuildContext context) {
return Material( return Material(
color: Colors.transparent, color: Colors.transparent,
child: Semantics(
label: S.of(context).share,
child: IconButton( child: IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
constraints: BoxConstraints(), constraints: BoxConstraints(),
@ -113,6 +115,7 @@ class AddressPage extends BasePage {
}, },
icon: Icon(Icons.share, size: 20, color: pageIconColor(context)), icon: Icon(Icons.share, size: 20, color: pageIconColor(context)),
), ),
),
); );
} }

@ -31,22 +31,30 @@ class HeaderRow extends StatelessWidget {
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor), color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor),
), ),
GestureDetector( Semantics(
container: true,
child: GestureDetector(
onTap: () { onTap: () {
showPopUp<void>( showPopUp<void>(
context: context, context: context,
builder: (context) => builder: (context) => FilterWidget(dashboardViewModel: dashboardViewModel),
FilterWidget(dashboardViewModel: dashboardViewModel)
); );
}, },
child: Semantics(
label: 'Transaction Filter',
button: true,
enabled: true,
child: Container( child: Container(
height: 36, height: 36,
width: 36, width: 36,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Theme.of(context).extension<FilterTheme>()!.buttonColor), color: Theme.of(context).extension<FilterTheme>()!.buttonColor,
),
child: filterIcon, child: filterIcon,
), ),
),
),
) )
], ],
), ),

@ -1,5 +1,5 @@
import 'package:cake_wallet/src/widgets/alert_close_button.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart'; import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart'; import 'package:cake_wallet/src/screens/ionia/widgets/rounded_checkbox.dart';
import 'package:cake_wallet/src/widgets/alert_background.dart'; import 'package:cake_wallet/src/widgets/alert_background.dart';
import 'package:cake_wallet/typography.dart'; import 'package:cake_wallet/typography.dart';
@ -71,7 +71,9 @@ class PresentReceiveOptionPicker extends StatelessWidget {
builder: (BuildContext popUpContext) => Scaffold( builder: (BuildContext popUpContext) => Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: AlertBackground( body: Stack(
alignment: AlignmentDirectional.center,
children:[ AlertBackground(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -126,24 +128,14 @@ class PresentReceiveOptionPicker extends StatelessWidget {
)), )),
), ),
), ),
Spacer(), Spacer()
Container( ],
margin: EdgeInsets.only(bottom: 40),
child: InkWell(
onTap: () => Navigator.pop(popUpContext),
child: CircleAvatar(
child: Icon(
Icons.close,
color: Palette.darkBlueCraiola,
),
backgroundColor: Colors.white,
), ),
), ),
) AlertCloseButton(onTap: () => Navigator.of(popUpContext).pop(), bottom: 40)
], ],
), ),
), ),
),
context: context, context: context,
); );
} }

@ -416,6 +416,8 @@ class ExchangeCardState extends State<ExchangeCard> {
width: 34, width: 34,
height: 34, height: 34,
padding: EdgeInsets.only(top: 0), padding: EdgeInsets.only(top: 0),
child: Semantics(
label: S.of(context).address_book,
child: InkWell( child: InkWell(
onTap: () async { onTap: () async {
final contact = final contact =
@ -447,6 +449,7 @@ class ExchangeCardState extends State<ExchangeCard> {
'assets/images/open_book.png', 'assets/images/open_book.png',
color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor, color: Theme.of(context).extension<SendPageTheme>()!.textFieldButtonIconColor,
)), )),
),
)), )),
), ),
Padding( Padding(
@ -455,6 +458,8 @@ class ExchangeCardState extends State<ExchangeCard> {
width: 34, width: 34,
height: 34, height: 34,
padding: EdgeInsets.only(top: 0), padding: EdgeInsets.only(top: 0),
child: Semantics(
label: S.of(context).copy_address,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Clipboard.setData(ClipboardData( Clipboard.setData(ClipboardData(
@ -471,6 +476,7 @@ class ExchangeCardState extends State<ExchangeCard> {
8, 8, 0, 8), 8, 8, 0, 8),
color: Colors.transparent, color: Colors.transparent,
child: copyImage), child: copyImage),
),
))) )))
]))) ])))
])), ])),

@ -1,8 +1,10 @@
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/palette.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class AlertCloseButton extends StatelessWidget { class AlertCloseButton extends StatelessWidget {
AlertCloseButton({this.image, this.bottom, this.onTap}); AlertCloseButton({this.image, this.bottom, this.onTap});
final VoidCallback? onTap; final VoidCallback? onTap;
final Image? image; final Image? image;
@ -19,6 +21,10 @@ class AlertCloseButton extends StatelessWidget {
bottom: bottom ?? 60, bottom: bottom ?? 60,
child: GestureDetector( child: GestureDetector(
onTap: onTap ?? () => Navigator.of(context).pop(), onTap: onTap ?? () => Navigator.of(context).pop(),
child: Semantics(
label: S.of(context).close,
button: true,
enabled: true,
child: Container( child: Container(
height: 42, height: 42,
width: 42, width: 42,
@ -28,6 +34,7 @@ class AlertCloseButton extends StatelessWidget {
), ),
), ),
), ),
),
); );
} }
} }

Loading…
Cancel
Save