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

This commit is contained in:
Shi-Hao Hong
2020-05-07 17:54:09 -07:00
committed by GitHub
parent 4560ebcf9f
commit 960b75719e
4 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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,
));

View File

@@ -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"

View File

@@ -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;