Unverified Commit 960b7571 authored by Shi-Hao Hong's avatar Shi-Hao Hong Committed by GitHub

Update Tab semantics in Cupertino to be the same as Material (#56582)

parent 4560ebcf
......@@ -262,7 +262,7 @@ class _CupertinoLocalizationsDelegate extends LocalizationsDelegate<CupertinoLoc
String toString() => 'DefaultCupertinoLocalizations.delegate(en_US)';
}
/// US English strings for the cupertino widgets.
/// US English strings for the Cupertino widgets.
class DefaultCupertinoLocalizations implements CupertinoLocalizations {
/// Constructs an object that defines the cupertino widgets' localized strings
/// for US English (only).
......@@ -367,7 +367,7 @@ class DefaultCupertinoLocalizations implements CupertinoLocalizations {
String tabSemanticsLabel({int tabIndex, int tabCount}) {
assert(tabIndex >= 1);
assert(tabCount >= 1);
return 'tab, $tabIndex of $tabCount';
return 'Tab $tabIndex of $tabCount';
}
@override
......
......@@ -385,14 +385,14 @@ void main() {
expect(semantics, includesNodeWith(
label: 'Tab 1',
hint: 'tab, 1 of 2',
hint: 'Tab 1 of 2',
flags: <SemanticsFlag>[SemanticsFlag.isSelected],
textDirection: TextDirection.ltr,
));
expect(semantics, includesNodeWith(
label: 'Tab 2',
hint: 'tab, 2 of 2',
hint: 'Tab 2 of 2',
textDirection: TextDirection.ltr,
));
......
......@@ -43,7 +43,7 @@
"description": "The accessibility audio announcement made when an iOS style alert dialog is opened."
},
"tabSemanticsLabel": "tab, $tabIndex of $tabCount",
"tabSemanticsLabel": "Tab $tabIndex of $tabCount",
"@tabSemanticsLabel": {
"description": "The accessibility label used on a tab. This message describes the index of the selected tab and how many tabs there are, e.g. 'tab, 1 of 2'. All values are greater than or equal to one.",
"parameters": "tabIndex, tabCount"
......
......@@ -2271,7 +2271,7 @@ class CupertinoLocalizationEn extends GlobalCupertinoLocalizations {
String get selectAllButtonLabel => 'Select All';
@override
String get tabSemanticsLabelRaw => 'tab, \$tabIndex of \$tabCount';
String get tabSemanticsLabelRaw => 'Tab \$tabIndex of \$tabCount';
@override
String get timerPickerHourLabelFew => 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