add 1of 3 into tabbar for accessibility team
This commit is contained in:
parent
522f7a4be2
commit
a51079b601
@ -197,9 +197,9 @@ static NSString * const COLLECTION_CELL_ID = @"cell";
|
|||||||
cell.isAccessibilityElement = NO;
|
cell.isAccessibilityElement = NO;
|
||||||
cell.contentView.isAccessibilityElement = YES;
|
cell.contentView.isAccessibilityElement = YES;
|
||||||
|
|
||||||
NSString *accLabel = [title stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTab"]];
|
NSString *titleString = [label.text stringByAppendingString:[NSString stringWithFormat:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabIndex"], self.selectedIndex + 1, [self.datasource numberOfTopTabbarItems:self]]];
|
||||||
|
NSString *accLabel = [titleString stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTab"]];
|
||||||
cell.contentView.accessibilityLabel = accLabel;
|
cell.contentView.accessibilityLabel = accLabel;
|
||||||
cell.contentView.accessibilityValue = [NSString stringWithFormat:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabIndex"],indexPath.row + 1, [self.datasource numberOfTopTabbarItems:self]];
|
|
||||||
[cell.contentView setAccessibilityHint:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabHint"]];
|
[cell.contentView setAccessibilityHint:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabHint"]];
|
||||||
|
|
||||||
if (indexPath.row == self.selectedIndex) {
|
if (indexPath.row == self.selectedIndex) {
|
||||||
@ -405,16 +405,17 @@ static NSString * const COLLECTION_CELL_ID = @"cell";
|
|||||||
[cell layoutIfNeeded];
|
[cell layoutIfNeeded];
|
||||||
}
|
}
|
||||||
|
|
||||||
//setup selected tab accessibility
|
|
||||||
NSString *string = label.text;
|
|
||||||
NSString *accLabel = [string stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"toptabbar_tab_selected"]];
|
|
||||||
cell.contentView.accessibilityLabel = accLabel;
|
|
||||||
[cell.contentView setAccessibilityHint:nil];
|
|
||||||
|
|
||||||
self.selectedIndex = indexPath.row;
|
self.selectedIndex = indexPath.row;
|
||||||
if ([self.delegate respondsToSelector:@selector(topTabbar:titleForItemAtIndex:)]){
|
if ([self.delegate respondsToSelector:@selector(topTabbar:titleForItemAtIndex:)]){
|
||||||
[self.delegate topTabbar:self didSelectItemAtIndex:indexPath.row];
|
[self.delegate topTabbar:self didSelectItemAtIndex:indexPath.row];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//setup selected tab accessibility
|
||||||
|
NSString *string = [label.text stringByAppendingString:[NSString stringWithFormat:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabIndex"], self.selectedIndex + 1, [self.datasource numberOfTopTabbarItems:self]]];
|
||||||
|
NSString *accLabel = [string stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"toptabbar_tab_selected"]];
|
||||||
|
cell.contentView.accessibilityLabel = accLabel;
|
||||||
|
[cell.contentView setAccessibilityHint:nil];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)reloadData {
|
- (void)reloadData {
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
// Tab
|
// Tab
|
||||||
"AccTab" = ", tab";
|
"AccTab" = ", tab";
|
||||||
"AccTabHint" = "Double tap to select.";
|
"AccTabHint" = "Double tap to select.";
|
||||||
"AccTabIndex" = "%ld of %ld";
|
"AccTabIndex" = ", %ld of %ld";
|
||||||
// top alert
|
// top alert
|
||||||
"toptabbar_tab_selected" = ", tab, Selected";
|
"toptabbar_tab_selected" = ", tab, Selected";
|
||||||
"AccTopAlertClosed" = "Top alert notification is closed.";
|
"AccTopAlertClosed" = "Top alert notification is closed.";
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
// Tab
|
// Tab
|
||||||
"AccTab" = ", pestaña";
|
"AccTab" = ", pestaña";
|
||||||
"AccTabHint" = "Toca dos veces para seleccionar.";
|
"AccTabHint" = "Toca dos veces para seleccionar.";
|
||||||
"AccTabIndex" = "%ld de %ld";
|
"AccTabIndex" = ", %ld de %ld";
|
||||||
// top alert
|
// top alert
|
||||||
"toptabbar_tab_selected" = ", pestaña, Seleccionado";
|
"toptabbar_tab_selected" = ", pestaña, Seleccionado";
|
||||||
"AccTopAlertClosed" = "La notificación de alerta máxima está desactivada.";
|
"AccTopAlertClosed" = "La notificación de alerta máxima está desactivada.";
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
// Tab
|
// Tab
|
||||||
"AccTab" = ", pestaña";
|
"AccTab" = ", pestaña";
|
||||||
"AccTabHint" = "Toca dos veces para seleccionar.";
|
"AccTabHint" = "Toca dos veces para seleccionar.";
|
||||||
"AccTabIndex" = "%ld de %ld";
|
"AccTabIndex" = ", %ld de %ld";
|
||||||
// top alert
|
// top alert
|
||||||
"toptabbar_tab_selected" = ", pestaña, Seleccionado";
|
"toptabbar_tab_selected" = ", pestaña, Seleccionado";
|
||||||
"AccTopAlertClosed" = "La notificación de alerta máxima está desactivada.";
|
"AccTopAlertClosed" = "La notificación de alerta máxima está desactivada.";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user