Add a11y label for expanded/collapsed status for Master Feed

This commit is contained in:
Rizwan Mohamed Ibrahim 2020-07-14 18:07:29 +05:30
parent 4625805fba
commit 1427e1d8c6
No known key found for this signature in database
GPG Key ID: D5BEE468D448BCC5
1 changed files with 12 additions and 2 deletions

View File

@ -21,12 +21,22 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
get {
if unreadCount > 0 {
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
return "\(name) \(unreadCount) \(unreadLabel)"
return "\(name) \(unreadCount) \(unreadLabel) \(expandedStateMessage) "
} else {
return name
return "\(name) \(expandedStateMessage) "
}
}
}
private var expandedStateMessage: String {
set {}
get {
if disclosureExpanded {
return NSLocalizedString("Expanded", comment: "Disclosure button expanded state for accessibility")
}
return NSLocalizedString("Collapsed", comment: "Disclosure button expanded state for accessibility")
}
}
var unreadCount: Int {
get {