| ... | @@ -1217,6 +1217,19 @@ final class PagesViewController: UITableViewController { | ... | @@ -1217,6 +1217,19 @@ final class PagesViewController: UITableViewController { |
| 1217 | } | 1217 | } |
| 1218 | } | 1218 | } |
| 1219 | cell.contentConfiguration = content | 1219 | cell.contentConfiguration = content |
| | 1220 | cell.isAccessibilityElement = true |
| | 1221 | cell.accessibilityLabel = [content.text, content.secondaryText].compactMap { $0 }.joined(separator: ", ") |
| | 1222 | cell.accessibilityActivateBlock = { [weak self, weak cell] in |
| | 1223 | guard let self, let cell, let indexPath = self.tableView.indexPath(for: cell) else { return false } |
| | 1224 | if self.isEditing && cell.isSelected { |
| | 1225 | self.tableView.deselectRow(at: indexPath, animated: true) |
| | 1226 | self.tableView(self.tableView, didDeselectRowAt: indexPath) |
| | 1227 | } else { |
| | 1228 | self.tableView.selectRow(at: indexPath, animated: true, scrollPosition: .none) |
| | 1229 | self.tableView(self.tableView, didSelectRowAt: indexPath) |
| | 1230 | } |
| | 1231 | return true |
| | 1232 | } |
| 1220 | cell.accessibilityCustomActions = arrangeActions(item) | 1233 | cell.accessibilityCustomActions = arrangeActions(item) |
| 1221 | return cell | 1234 | return cell |
| 1222 | } | 1235 | } |