iOS VoiceOver accessibility overhaul — 67 files

New framework:
- AccessibilityLabels.swift: centralized A11y struct with VoiceOver strings
- AccessibilityModifiers.swift: reusable .a11yHeader, .a11yDecorative,
  .a11yButton, .a11yCard, .a11yStatValue View extensions

Shared components: decorative elements hidden, stat views combined,
status/priority badges labeled, error views announced, empty states grouped

Cards: ResidenceCard, TaskCard, DynamicTaskCard, ContractorCard,
DocumentCard, WarrantyCard — all grouped with combined labels,
chevrons hidden, action buttons labeled

Main screens: Login, Register, Residences, Tasks, Contractors, Documents —
toolbar buttons labeled, section headers marked, form field hints added

Onboarding: all 10 views — header traits, button hints, task selection
state, progress indicator, decorative backgrounds hidden

Profile/Subscription: toggle hints, theme selection state, feature
comparison table accessibility, subscription button labels

iOS build verified: BUILD SUCCEEDED
This commit is contained in:
Trey T
2026-03-26 14:51:29 -05:00
parent 0d80df07f6
commit af73f8861b
67 changed files with 394 additions and 8 deletions

View File

@@ -295,6 +295,7 @@ private extension ResidenceDetailView {
Text(L10n.Residences.contractors)
.font(.system(size: 20, weight: .bold, design: .rounded))
.foregroundColor(Color.appTextPrimary)
.accessibilityAddTraits(.isHeader)
Spacer()
}
@@ -351,10 +352,11 @@ private extension ResidenceDetailView {
showEditResidence = true
}
.accessibilityIdentifier(AccessibilityIdentifiers.Residence.editButton)
.accessibilityLabel("Edit property")
}
}
}
@ToolbarContentBuilder
var trailingToolbar: some ToolbarContent {
ToolbarItemGroup(placement: .navigationBarTrailing) {
@@ -369,6 +371,7 @@ private extension ResidenceDetailView {
}
}
.disabled(viewModel.isGeneratingReport)
.accessibilityLabel("Generate maintenance report")
}
// Manage Users button (owner only) - includes share code generation and easy share
@@ -383,6 +386,7 @@ private extension ResidenceDetailView {
} label: {
Image(systemName: "person.2")
}
.accessibilityLabel("Manage users")
}
Button {
@@ -398,6 +402,7 @@ private extension ResidenceDetailView {
Image(systemName: "plus")
}
.accessibilityIdentifier(AccessibilityIdentifiers.Task.addButton)
.accessibilityLabel("Add task")
if let residence = viewModel.selectedResidence, isCurrentUserOwner(of: residence) {
Button {
@@ -407,6 +412,7 @@ private extension ResidenceDetailView {
.foregroundStyle(Color.appError)
}
.accessibilityIdentifier(AccessibilityIdentifiers.Residence.deleteButton)
.accessibilityLabel("Delete property")
}
}
}

View File

@@ -55,6 +55,7 @@ struct ResidencesListView: View {
OrganicToolbarButton(systemName: "gearshape.fill")
}
.accessibilityIdentifier(AccessibilityIdentifiers.Navigation.settingsButton)
.accessibilityLabel("Settings")
}
ToolbarItemGroup(placement: .navigationBarTrailing) {
@@ -69,6 +70,7 @@ struct ResidencesListView: View {
}) {
OrganicToolbarButton(systemName: "person.badge.plus")
}
.accessibilityLabel("Join a property")
Button(action: {
// Check if we should show upgrade prompt before adding
@@ -82,6 +84,7 @@ struct ResidencesListView: View {
OrganicToolbarButton(systemName: "plus", isPrimary: true)
}
.accessibilityIdentifier(AccessibilityIdentifiers.Residence.addButton)
.accessibilityLabel("Add new property")
}
}
.sheet(isPresented: $showingAddResidence) {