Commit 792c9875 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

a11y fix for list_demo.dart (#11142)

* a11y fix for list_demo.dart

* fix semantics of persistant bottom sheet
parent 18d9b20f
......@@ -58,7 +58,8 @@ class _ListDemoState extends State<ListDemo> {
shrinkWrap: true,
primary: false,
children: <Widget>[
new ListTile(
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('One-line'),
trailing: new Radio<_MaterialListType>(
......@@ -67,7 +68,9 @@ class _ListDemoState extends State<ListDemo> {
onChanged: changeItemType,
)
),
new ListTile(
),
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('Two-line'),
trailing: new Radio<_MaterialListType>(
......@@ -76,7 +79,9 @@ class _ListDemoState extends State<ListDemo> {
onChanged: changeItemType,
)
),
new ListTile(
),
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('Three-line'),
trailing: new Radio<_MaterialListType>(
......@@ -85,7 +90,9 @@ class _ListDemoState extends State<ListDemo> {
onChanged: changeItemType,
),
),
new ListTile(
),
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('Show avatar'),
trailing: new Checkbox(
......@@ -98,7 +105,9 @@ class _ListDemoState extends State<ListDemo> {
},
),
),
new ListTile(
),
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('Show icon'),
trailing: new Checkbox(
......@@ -111,7 +120,9 @@ class _ListDemoState extends State<ListDemo> {
},
),
),
new ListTile(
),
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('Show dividers'),
trailing: new Checkbox(
......@@ -124,7 +135,9 @@ class _ListDemoState extends State<ListDemo> {
},
),
),
new ListTile(
),
new MergeSemantics(
child: new ListTile(
dense: true,
title: const Text('Dense layout'),
trailing: new Checkbox(
......@@ -137,6 +150,7 @@ class _ListDemoState extends State<ListDemo> {
},
),
),
),
],
),
);
......@@ -164,13 +178,15 @@ class _ListDemoState extends State<ListDemo> {
"Even more additional list item information appears on line three.",
);
}
return new ListTile(
return new MergeSemantics(
child: new ListTile(
isThreeLine: _itemType == _MaterialListType.threeLine,
dense: _dense,
leading: _showAvatars ? new CircleAvatar(child: new Text(item)) : null,
leading: _showAvatars ? new ExcludeSemantics(child: new CircleAvatar(child: new Text(item))) : null,
title: new Text('This item represents $item.'),
subtitle: secondary,
trailing: _showIcons ? new Icon(Icons.info, color: Theme.of(context).disabledColor) : null,
),
);
}
......
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