Add a11y label for expanded/collapsed status for Master Feed
This commit is contained in:
parent
4625805fba
commit
1427e1d8c6
|
@ -21,13 +21,23 @@ 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 {
|
||||
return unreadCountView.unreadCount
|
||||
|
|
Loading…
Reference in New Issue