Unverified Commit 15a4b009 authored by Pierre-Louis's avatar Pierre-Louis Committed by GitHub

Use correct semantics for toggle buttons (#113851)

* Use correct semantics for toggle buttons

* x
parent 0b1fbd29
......@@ -798,7 +798,7 @@ class ToggleButtons extends StatelessWidget {
return MergeSemantics(
child: Semantics(
container: true,
toggled: isSelected[index],
checked: isSelected[index],
enabled: onPressed != null,
child: _InputPadding(
minSize: minPaddingSize,
......
......@@ -2006,7 +2006,7 @@ void main() {
SemanticsFlag.isButton,
SemanticsFlag.isEnabled,
SemanticsFlag.hasEnabledState,
SemanticsFlag.hasToggledState,
SemanticsFlag.hasCheckedState,
SemanticsFlag.isFocusable,
],
actions: <SemanticsAction>[
......@@ -2019,7 +2019,7 @@ void main() {
SemanticsFlag.isButton,
SemanticsFlag.isEnabled,
SemanticsFlag.hasEnabledState,
SemanticsFlag.hasToggledState,
SemanticsFlag.hasCheckedState,
SemanticsFlag.isFocusable,
],
actions: <SemanticsAction>[
......@@ -2032,7 +2032,7 @@ void main() {
SemanticsFlag.isButton,
SemanticsFlag.isEnabled,
SemanticsFlag.hasEnabledState,
SemanticsFlag.hasToggledState,
SemanticsFlag.hasCheckedState,
SemanticsFlag.isFocusable,
],
actions: <SemanticsAction>[
......@@ -2051,7 +2051,7 @@ void main() {
semantics.dispose();
});
testWidgets('Toggle buttons have correct semantics', (WidgetTester tester) async {
testWidgets('Toggle buttons have correct semantics', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester);
await tester.pumpWidget(
......@@ -2079,7 +2079,7 @@ void main() {
SemanticsFlag.isButton,
SemanticsFlag.isEnabled,
SemanticsFlag.hasEnabledState,
SemanticsFlag.hasToggledState,
SemanticsFlag.hasCheckedState,
SemanticsFlag.isFocusable,
],
actions: <SemanticsAction>[
......@@ -2091,8 +2091,8 @@ void main() {
SemanticsFlag.isButton,
SemanticsFlag.isEnabled,
SemanticsFlag.hasEnabledState,
SemanticsFlag.isToggled,
SemanticsFlag.hasToggledState,
SemanticsFlag.isChecked,
SemanticsFlag.hasCheckedState,
SemanticsFlag.isFocusable,
],
actions: <SemanticsAction>[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment