hit region issues were caused by dynamic type checks not working properly, so they have been removed

This commit is contained in:
Mauro Romito
2025-07-21 19:40:26 +02:00
committed by Mauro
parent 8a66cbad68
commit 97f517129f
6 changed files with 3 additions and 18 deletions
@@ -91,9 +91,9 @@ final class AccessibilityTests: XCTestCase {
private static let notHumanReadableMessage = "Label not human-readable" private static let notHumanReadableMessage = "Label not human-readable"
/// Use this array to filter add specific filters to ignore specific issues for certain elements /// 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)], private static let ignoredA11yIdentifiers: [String: [FilterType]] = [
A11yIdentifiers.pollView.summary: [.auditType(.hitRegion)], A11yIdentifiers.serverConfirmationScreen.serverPicker: [.compactDescription(notHumanReadableMessage)]
A11yIdentifiers.serverConfirmationScreen.serverPicker: [.compactDescription(notHumanReadableMessage)]] ]
} }
private enum FilterType { private enum FilterType {
@@ -42,7 +42,6 @@ enum A11yIdentifiers {
static let pollFormScreen = PollFormScreen() static let pollFormScreen = PollFormScreen()
static let roomPollsHistoryScreen = RoomPollsHistoryScreen() static let roomPollsHistoryScreen = RoomPollsHistoryScreen()
static let manageRoomMemberSheet = ManageRoomMemberSheet() static let manageRoomMemberSheet = ManageRoomMemberSheet()
static let pollView = PollView()
struct AlertInfo { struct AlertInfo {
let primaryButton = "alert_info-primary_button" let primaryButton = "alert_info-primary_button"
@@ -298,8 +297,4 @@ enum A11yIdentifiers {
struct ManageRoomMemberSheet { struct ManageRoomMemberSheet {
let viewProfile = "manage_room_member_sheet-view_profile" let viewProfile = "manage_room_member_sheet-view_profile"
} }
struct PollView {
let summary = "poll_view-summary"
}
} }
@@ -68,9 +68,6 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
Image(systemName: "xmark") Image(systemName: "xmark")
.foregroundColor(.compound.iconSecondary) .foregroundColor(.compound.iconSecondary)
.frame(width: 12, height: 12) .frame(width: 12, height: 12)
// Increase hit area
.padding(.leading, 5)
.padding(.bottom, 2)
} }
} }
} }
@@ -82,9 +82,6 @@ struct MediaUploadPreviewScreen: View {
context.isPresentingMediaCaptionWarning = true context.isPresentingMediaCaptionWarning = true
} label: { } label: {
CompoundIcon(\.infoSolid, size: .xSmall, relativeTo: .compound.bodyLG) CompoundIcon(\.infoSolid, size: .xSmall, relativeTo: .compound.bodyLG)
// Increase hit area
.padding(.leading, 5)
.padding(.vertical, 2)
} }
.tint(.compound.iconCriticalPrimary) .tint(.compound.iconCriticalPrimary)
.popover(isPresented: $context.isPresentingMediaCaptionWarning, arrowEdge: .bottom) { .popover(isPresented: $context.isPresentingMediaCaptionWarning, arrowEdge: .bottom) {
@@ -44,9 +44,6 @@ struct RoomChangeRolesScreenSelectedItem: View {
.scaledFrame(size: 20) .scaledFrame(size: 20)
.symbolRenderingMode(.palette) .symbolRenderingMode(.palette)
.foregroundStyle(Color.compound.iconOnSolidPrimary, Color.compound.iconPrimary) .foregroundStyle(Color.compound.iconOnSolidPrimary, Color.compound.iconPrimary)
// Increase hit area
.padding(.leading, 5)
.padding(.bottom, 5)
} }
// We will use the accessibility action // We will use the accessibility action
.accessibilityHidden(true) .accessibilityHidden(true)
@@ -128,7 +128,6 @@ struct PollView: View {
.scaledPadding(.leading, showVotes ? 0 : 32) .scaledPadding(.leading, showVotes ? 0 : 32)
.foregroundColor(.compound.textSecondary) .foregroundColor(.compound.textSecondary)
.frame(maxWidth: .infinity, alignment: showVotes ? .trailing : .leading) .frame(maxWidth: .infinity, alignment: showVotes ? .trailing : .leading)
.accessibilityIdentifier(A11yIdentifiers.pollView.summary)
} }
} }