diff --git a/lib/src/style/fixed_circle_tab_style.dart b/lib/src/style/fixed_circle_tab_style.dart index e306800..14e64ae 100644 --- a/lib/src/style/fixed_circle_tab_style.dart +++ b/lib/src/style/fixed_circle_tab_style.dart @@ -73,11 +73,14 @@ class FixedCircleTabStyle extends InnerBuilder { var children = noLabel ? [icon] : [icon, Text(item.title ?? '', style: textStyle)]; - return Container( - padding: EdgeInsets.only(bottom: 2), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: children, + return Semantics( + label: item.title, + child: Container( + padding: EdgeInsets.only(bottom: 2), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: children, + ), ), ); } diff --git a/lib/src/style/fixed_tab_style.dart b/lib/src/style/fixed_tab_style.dart index d6fee76..ba1dbb9 100644 --- a/lib/src/style/fixed_tab_style.dart +++ b/lib/src/style/fixed_tab_style.dart @@ -67,11 +67,14 @@ class FixedTabStyle extends InnerBuilder { var children = noLabel ? [icon] : [icon, Text(item.title ?? '', style: textStyle)]; - return Container( - padding: EdgeInsets.only(bottom: 2), - child: Column( - mainAxisAlignment: MainAxisAlignment.end, - children: children, + return Semantics( + label: item.title, + child: Container( + padding: EdgeInsets.only(bottom: 2), + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: children, + ), ), ); } diff --git a/lib/src/style/flip_tab_style.dart b/lib/src/style/flip_tab_style.dart index 57440b4..780e69e 100644 --- a/lib/src/style/flip_tab_style.dart +++ b/lib/src/style/flip_tab_style.dart @@ -75,11 +75,14 @@ class FlipTabStyle extends InnerBuilder { curve: curve, ); } - return Center( - child: BlendImageIcon( - item.icon, - color: item.blend ? color : null, - size: style.iconSize, + return Semantics( + label: item.title, + child: Center( + child: BlendImageIcon( + item.icon, + color: item.blend ? color : null, + size: style.iconSize, + ), ), ); } diff --git a/lib/src/style/react_circle_tab_style.dart b/lib/src/style/react_circle_tab_style.dart index e7e596f..2333c02 100644 --- a/lib/src/style/react_circle_tab_style.dart +++ b/lib/src/style/react_circle_tab_style.dart @@ -78,11 +78,14 @@ class ReactCircleTabStyle extends InnerBuilder { if (!noLabel) { children.add(Text(item.title ?? '', style: textStyle)); } - return Container( - padding: EdgeInsets.only(bottom: 2), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: children, + return Semantics( + label: item.title, + child: Container( + padding: EdgeInsets.only(bottom: 2), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: children, + ), ), ); } diff --git a/lib/src/style/react_tab_style.dart b/lib/src/style/react_tab_style.dart index 66903db..dfa8ebf 100644 --- a/lib/src/style/react_tab_style.dart +++ b/lib/src/style/react_tab_style.dart @@ -73,12 +73,15 @@ class ReactTabStyle extends InnerBuilder { children.add(Text(item.title ?? '', style: style.textStyle(color, item.fontFamily))); } - return Container( - padding: const EdgeInsets.only(bottom: 2), - child: Column( - mainAxisAlignment: - noLabel ? MainAxisAlignment.center : MainAxisAlignment.end, - children: children, + return Semantics( + label: item.title, + child: Container( + padding: const EdgeInsets.only(bottom: 2), + child: Column( + mainAxisAlignment: + noLabel ? MainAxisAlignment.center : MainAxisAlignment.end, + children: children, + ), ), ); } diff --git a/lib/src/style/textin_tab_style.dart b/lib/src/style/textin_tab_style.dart index c293aae..62959a2 100644 --- a/lib/src/style/textin_tab_style.dart +++ b/lib/src/style/textin_tab_style.dart @@ -63,9 +63,12 @@ class TextInTabStyle extends InnerBuilder { ); } - return Center( - child: BlendImageIcon(item.icon, - size: style.iconSize, color: item.blend ? color : null), + return Semantics( + label: item.title, + child: Center( + child: BlendImageIcon(item.icon, + size: style.iconSize, color: item.blend ? color : null), + ), ); } } diff --git a/lib/src/style/titled_tab_style.dart b/lib/src/style/titled_tab_style.dart index 9e7ea3f..c4f7a92 100644 --- a/lib/src/style/titled_tab_style.dart +++ b/lib/src/style/titled_tab_style.dart @@ -97,6 +97,9 @@ class TitledTabStyle extends InnerBuilder { ], ); } - return Center(child: Text(item.title ?? '', style: textStyle)); + return Semantics( + label: item.title, + child: Center(child: Text(item.title ?? '', style: textStyle)), + ); } }