From 7ca09704a666b9adcf7406210f5707fccce92614 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sun, 11 Oct 2026 16:28:48 -0700 Subject: [PATCH] fix(ios): name and activate page accessibility rows Group each page as one named accessibility element. Resolve its current index path on activation, then use native selection and existing list callbacks. Retain native selected traits and the existing custom move actions. Refs: #125 Assisted-by: gpt-6.1-sol --- apps/ios/Snowbound/Lists.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/ios/Snowbound/Lists.swift b/apps/ios/Snowbound/Lists.swift index 042b74c683c30b77751bd66bb7c23ee9cf663bdd..bb98d2ada20ff1145f9b086931a8d54147f8d4ae 100644 --- a/apps/ios/Snowbound/Lists.swift +++ b/apps/ios/Snowbound/Lists.swift @@ -1217,6 +1217,19 @@ final class PagesViewController: UITableViewController { } } cell.contentConfiguration = content + cell.isAccessibilityElement = true + cell.accessibilityLabel = [content.text, content.secondaryText].compactMap { $0 }.joined(separator: ", ") + cell.accessibilityActivateBlock = { [weak self, weak cell] in + guard let self, let cell, let indexPath = self.tableView.indexPath(for: cell) else { return false } + if self.isEditing && cell.isSelected { + self.tableView.deselectRow(at: indexPath, animated: true) + self.tableView(self.tableView, didDeselectRowAt: indexPath) + } else { + self.tableView.selectRow(at: indexPath, animated: true, scrollPosition: .none) + self.tableView(self.tableView, didSelectRowAt: indexPath) + } + return true + } cell.accessibilityCustomActions = arrangeActions(item) return cell } -- 2.54.0