From 2a24b11c1582b0af9d78a06fead528d1da874d2f Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Mon, 21 Jul 2025 19:40:26 +0200 Subject: [PATCH] hit region issues were caused by dynamic type checks not working properly, so they have been removed --- AccessibilityTests/Sources/AccessibilityTests.swift | 6 +++--- ElementX/Sources/Other/AccessibilityIdentifiers.swift | 5 ----- .../View/HomeScreenRecoveryKeyConfirmationBanner.swift | 3 --- .../View/MediaUploadPreviewScreen.swift | 3 --- .../View/RoomChangeRolesScreenSelectedItem.swift | 3 --- ElementX/Sources/Screens/Timeline/View/Polls/PollView.swift | 1 - 6 files changed, 3 insertions(+), 18 deletions(-) diff --git a/AccessibilityTests/Sources/AccessibilityTests.swift b/AccessibilityTests/Sources/AccessibilityTests.swift index 99dd6693b..7092d203e 100644 --- a/AccessibilityTests/Sources/AccessibilityTests.swift +++ b/AccessibilityTests/Sources/AccessibilityTests.swift @@ -91,9 +91,9 @@ final class AccessibilityTests: XCTestCase { private static let notHumanReadableMessage = "Label not human-readable" /// Use this array to filter add specific filters to ignore specific issues for certain elements - private static let ignoredA11yIdentifiers: [String: [FilterType]] = [A11yIdentifiers.authenticationStartScreen.appVersion: [.auditType(.hitRegion)], - A11yIdentifiers.pollView.summary: [.auditType(.hitRegion)], - A11yIdentifiers.serverConfirmationScreen.serverPicker: [.compactDescription(notHumanReadableMessage)]] + private static let ignoredA11yIdentifiers: [String: [FilterType]] = [ + A11yIdentifiers.serverConfirmationScreen.serverPicker: [.compactDescription(notHumanReadableMessage)] + ] } private enum FilterType { diff --git a/ElementX/Sources/Other/AccessibilityIdentifiers.swift b/ElementX/Sources/Other/AccessibilityIdentifiers.swift index d29216ca1..8cedb2c5b 100644 --- a/ElementX/Sources/Other/AccessibilityIdentifiers.swift +++ b/ElementX/Sources/Other/AccessibilityIdentifiers.swift @@ -42,7 +42,6 @@ enum A11yIdentifiers { static let pollFormScreen = PollFormScreen() static let roomPollsHistoryScreen = RoomPollsHistoryScreen() static let manageRoomMemberSheet = ManageRoomMemberSheet() - static let pollView = PollView() struct AlertInfo { let primaryButton = "alert_info-primary_button" @@ -298,8 +297,4 @@ enum A11yIdentifiers { struct ManageRoomMemberSheet { let viewProfile = "manage_room_member_sheet-view_profile" } - - struct PollView { - let summary = "poll_view-summary" - } } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift index 40b13a165..f45a1e956 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift @@ -68,9 +68,6 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View { Image(systemName: "xmark") .foregroundColor(.compound.iconSecondary) .frame(width: 12, height: 12) - // Increase hit area - .padding(.leading, 5) - .padding(.bottom, 2) } } } diff --git a/ElementX/Sources/Screens/MediaUploadPreviewScreen/View/MediaUploadPreviewScreen.swift b/ElementX/Sources/Screens/MediaUploadPreviewScreen/View/MediaUploadPreviewScreen.swift index 0103d31b1..06413fdb4 100644 --- a/ElementX/Sources/Screens/MediaUploadPreviewScreen/View/MediaUploadPreviewScreen.swift +++ b/ElementX/Sources/Screens/MediaUploadPreviewScreen/View/MediaUploadPreviewScreen.swift @@ -82,9 +82,6 @@ struct MediaUploadPreviewScreen: View { context.isPresentingMediaCaptionWarning = true } label: { CompoundIcon(\.infoSolid, size: .xSmall, relativeTo: .compound.bodyLG) - // Increase hit area - .padding(.leading, 5) - .padding(.vertical, 2) } .tint(.compound.iconCriticalPrimary) .popover(isPresented: $context.isPresentingMediaCaptionWarning, arrowEdge: .bottom) { diff --git a/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreenSelectedItem.swift b/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreenSelectedItem.swift index 4c0b7b9c1..f33c7882c 100644 --- a/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreenSelectedItem.swift +++ b/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreenSelectedItem.swift @@ -44,9 +44,6 @@ struct RoomChangeRolesScreenSelectedItem: View { .scaledFrame(size: 20) .symbolRenderingMode(.palette) .foregroundStyle(Color.compound.iconOnSolidPrimary, Color.compound.iconPrimary) - // Increase hit area - .padding(.leading, 5) - .padding(.bottom, 5) } // We will use the accessibility action .accessibilityHidden(true) diff --git a/ElementX/Sources/Screens/Timeline/View/Polls/PollView.swift b/ElementX/Sources/Screens/Timeline/View/Polls/PollView.swift index e58bde4e5..df7165b3f 100644 --- a/ElementX/Sources/Screens/Timeline/View/Polls/PollView.swift +++ b/ElementX/Sources/Screens/Timeline/View/Polls/PollView.swift @@ -128,7 +128,6 @@ struct PollView: View { .scaledPadding(.leading, showVotes ? 0 : 32) .foregroundColor(.compound.textSecondary) .frame(maxWidth: .infinity, alignment: showVotes ? .trailing : .leading) - .accessibilityIdentifier(A11yIdentifiers.pollView.summary) } }