Fix SegmentedControl accessibility (#19994)
This commit is contained in:
parent
ab9f17cbbe
commit
4fd6188d48
@ -313,6 +313,7 @@ class _SegmentedControlState<T> extends State<SegmentedControl<T>>
|
||||
child: new DefaultTextStyle(
|
||||
style: textStyle,
|
||||
child: new Semantics(
|
||||
button: true,
|
||||
inMutuallyExclusiveGroup: true,
|
||||
selected: widget.groupValue == currentKey,
|
||||
child: child,
|
||||
|
@ -606,6 +606,7 @@ void main() {
|
||||
new TestSemantics.rootChild(
|
||||
label: 'Child 1',
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
@ -616,6 +617,7 @@ void main() {
|
||||
new TestSemantics.rootChild(
|
||||
label: 'Child 2',
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
@ -640,6 +642,7 @@ void main() {
|
||||
new TestSemantics.rootChild(
|
||||
label: 'Child 1',
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
],
|
||||
actions: <SemanticsAction>[
|
||||
@ -649,6 +652,7 @@ void main() {
|
||||
new TestSemantics.rootChild(
|
||||
label: 'Child 2',
|
||||
flags: <SemanticsFlag>[
|
||||
SemanticsFlag.isButton,
|
||||
SemanticsFlag.isInMutuallyExclusiveGroup,
|
||||
SemanticsFlag.isSelected,
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user