Add accessibility labels for the Create New Group and Settings navigation bar buttons. FREEBIE.

This commit is contained in:
Darren W 2017-01-31 12:59:39 +09:00 committed by Matthew Chen
parent c46dd6b7fe
commit bf3a673443
3 changed files with 13 additions and 2 deletions

View File

@ -119,6 +119,9 @@ NSString *const MessageComposeTableViewControllerCellContact = @"ContactTableVie
[self.navigationController.navigationBar setTranslucent:NO];
[self useOWSBackButton];
self.navigationItem.rightBarButtonItem.accessibilityLabel = NSLocalizedString(
@"CREATE_NEW_GROUP", @"Accessibility label for the create group new group button");
self.tableView.estimatedRowHeight = (CGFloat)60.0;
self.tableView.rowHeight = UITableViewAutomaticDimension;

View File

@ -117,9 +117,11 @@ NSString *const SignalsViewControllerSegueShowIncomingCall = @"ShowIncomingCallS
[self.segmentedControl addTarget:self
action:@selector(swappedSegmentedControl)
forControlEvents:UIControlEventValueChanged];
self.navigationItem.titleView = self.segmentedControl;
UINavigationItem *navigationItem = self.navigationItem;
navigationItem.titleView = self.segmentedControl;
[self.segmentedControl setSelectedSegmentIndex:0];
navigationItem.leftBarButtonItem.accessibilityLabel = NSLocalizedString(
@"SETTINGS_BUTTON_ACCESSIBILITY", @"Accessibility hint for the settings button");
if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)] &&
(self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable)) {

View File

@ -124,6 +124,9 @@
/* No comment provided by engineer. */
"COUNTRYCODE_SELECT_TITLE" = "Select Country Code";
/* Accessibility label for the create new group button. */
"CREATE_NEW_GROUP" = "Create new group";
/* {{number of days}} embedded in strings, e.g. 'Alice updated disappearing messages expiration to {{5 days}}'. See other *_TIME_AMOUNT strings */
"DAYS_TIME_AMOUNT" = "%u days";
@ -780,6 +783,9 @@
/* Table cell label */
"SETTINGS_BLOCK_ON_IDENTITY_CHANGE_TITLE" = "Require Approval on Change";
/* Settings button accessibility hint */
"SETTINGS_BUTTON_ACCESSIBILITY" = "Settings";
/* No comment provided by engineer. */
"SETTINGS_CLEAR_HISTORY" = "Clear History Logs";