Unverified Commit f516074a authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Add header SemanticsFlag to bottom nav bar (#19803)

parent 70791c30
...@@ -277,6 +277,7 @@ class _BottomNavigationTile extends StatelessWidget { ...@@ -277,6 +277,7 @@ class _BottomNavigationTile extends StatelessWidget {
flex: size, flex: size,
child: new Semantics( child: new Semantics(
container: true, container: true,
header: true,
selected: selected, selected: selected,
child: new Stack( child: new Stack(
children: <Widget>[ children: <Widget>[
......
...@@ -574,19 +574,28 @@ void main() { ...@@ -574,19 +574,28 @@ void main() {
children: <TestSemantics>[ children: <TestSemantics>[
new TestSemantics( new TestSemantics(
id: 3, id: 3,
flags: <SemanticsFlag>[SemanticsFlag.isSelected], flags: <SemanticsFlag>[
SemanticsFlag.isSelected,
SemanticsFlag.isHeader,
],
actions: <SemanticsAction>[SemanticsAction.tap], actions: <SemanticsAction>[SemanticsAction.tap],
label: 'AC\nTab 1 of 3', label: 'AC\nTab 1 of 3',
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
), ),
new TestSemantics( new TestSemantics(
id: 4, id: 4,
flags: <SemanticsFlag>[
SemanticsFlag.isHeader,
],
actions: <SemanticsAction>[SemanticsAction.tap], actions: <SemanticsAction>[SemanticsAction.tap],
label: 'Alarm\nTab 2 of 3', label: 'Alarm\nTab 2 of 3',
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
), ),
new TestSemantics( new TestSemantics(
id: 5, id: 5,
flags: <SemanticsFlag>[
SemanticsFlag.isHeader,
],
actions: <SemanticsAction>[SemanticsAction.tap], actions: <SemanticsAction>[SemanticsAction.tap],
label: 'Hot Tub\nTab 3 of 3', label: 'Hot Tub\nTab 3 of 3',
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
......
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