Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* [*] Custom Post Types: Make custom post types with REST API and editor support available in My Site [#25849]
* [*] Stop the media picker from removing gallery images when you cancel it in the experimental editor [#25866]
* [*] Stats: Fix the screen getting stuck on a loading indicator for self-hosted sites that are not connected to Jetpack [#25858]
* [*] Accessibility: VoiceOver now announces which post categories are selected [#25737]

27.1
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,20 @@ import WordPressUI
let indentationLevel = categoryIndentationDict[category.categoryID.intValue]
cell.indentationLevel = indentationLevel ?? 0
cell.indentationWidth = Constants.categoryCellIndentation
cell.textLabel?.text = category.categoryName.stringByDecodingXMLCharacters()
let title = category.categoryName.stringByDecodingXMLCharacters()
cell.textLabel?.text = title
WPStyleGuide.configureTableViewCell(cell)
cell.accessoryView = makeAccessoryView(isSelected: selectedCategories.contains(category))

let isSelected = selectedCategories.contains(category)
cell.accessoryView = makeAccessoryView(isSelected: isSelected)

// The checkmark is drawn in an image view, which carries no accessibility
// information, so selected and unselected rows were indistinguishable.
// Make the cell a single element and let the trait carry the state, rather
// than appending "selected" to the label.
cell.isAccessibilityElement = true
cell.accessibilityLabel = title
cell.accessibilityTraits = isSelected ? [.selected] : []
}

private func makeAccessoryView(isSelected: Bool) -> UIView {
Expand Down