Add + update a11x for navigation titles (#1257)

* Add + update a11x for navigation items

* A file is not a file extension
This commit is contained in:
Bas Broek
2017-12-17 04:15:29 +01:00
committed by Ryan Nystrom
parent df968e02c6
commit 0db76b3b76
4 changed files with 36 additions and 6 deletions

View File

@@ -75,8 +75,9 @@ NewIssueTableViewControllerDelegate {
})
configureNavigationItems()
navigationItem.configure(title: repo.name, subtitle: repo.owner)
navigationItem.titleView?.accessibilityLabel = .localizedStringWithFormat("Repository, %@", "\(repo.owner)/\(repo.name)")
let labelFormat = NSLocalizedString("Repository %@ by %@", comment: "Accessibility label for a repository navigation item")
let accessibilityLabel = String(format: labelFormat, arguments: [repo.name, repo.owner])
navigationItem.configure(title: repo.name, subtitle: repo.owner, accessibilityLabel: accessibilityLabel)
}
// MARK: Private API