fix accessibility issues (#1224)

wow-support
Serhii 6 months ago committed by GitHub
parent faf151a4dc
commit 049e4def27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,7 +76,7 @@ class DisplaySettingsPage extends BasePage {
},
),
if (responsiveLayoutUtil.shouldRenderMobileUI && DeviceInfo.instance.isMobile)
SettingsThemeChoicesCell(_displaySettingsViewModel),
Semantics(label: S.current.color_theme, child: SettingsThemeChoicesCell(_displaySettingsViewModel)),
],
),
);

@ -54,6 +54,9 @@ class SettingsThemeChoicesCell extends StatelessWidget {
return Padding(
padding: EdgeInsets.all(5),
child: Semantics(
label: e.toString(),
selected: isSelected,
child: GestureDetector(
onTap: () {
_displaySettingsViewModel.setTheme(e);
@ -108,6 +111,7 @@ class SettingsThemeChoicesCell extends StatelessWidget {
),
),
),
),
);
}),
],

@ -14,7 +14,10 @@ class StandardSwitch extends StatefulWidget {
class StandardSwitchState extends State<StandardSwitch> {
@override
Widget build(BuildContext context) {
return GestureDetector(
return Semantics(
toggled: widget.value,
child: GestureDetector(
onTap: widget.onTaped,
child: AnimatedContainer(
padding: EdgeInsets.only(left: 2.0, right: 2.0),
@ -35,6 +38,7 @@ class StandardSwitchState extends State<StandardSwitch> {
shape: BoxShape.circle),
),
),
),
);
}
}

Loading…
Cancel
Save