read receipt cell should be grouped and the avatar accessibility hidden

This commit is contained in:
Mauro Romito
2025-07-21 13:35:56 +02:00
committed by Mauro
parent 9c0c0ed03a
commit e29b13fe08
4 changed files with 10 additions and 1 deletions

View File

@@ -91,7 +91,8 @@ 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)]]
private static let ignoredA11yIdentifiers: [String: [FilterType]] = [A11yIdentifiers.authenticationStartScreen.appVersion: [.auditType(.hitRegion)],
A11yIdentifiers.pollView.summary: [.auditType(.hitRegion)]]
}
private enum FilterType {

View File

@@ -42,6 +42,7 @@ 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"
@@ -297,4 +298,8 @@ enum A11yIdentifiers {
struct ManageRoomMemberSheet {
let viewProfile = "manage_room_member_sheet-view_profile"
}
struct PollView {
let summary = "poll_view-summary"
}
}

View File

@@ -128,6 +128,7 @@ struct PollView: View {
.scaledPadding(.leading, showVotes ? 0 : 32)
.foregroundColor(.compound.textSecondary)
.frame(maxWidth: .infinity, alignment: showVotes ? .trailing : .leading)
.accessibilityIdentifier(A11yIdentifiers.pollView.summary)
}
}

View File

@@ -30,6 +30,7 @@ struct ReadReceiptCell: View {
contentID: readReceipt.userID,
avatarSize: .user(on: .readReceiptSheet),
mediaProvider: mediaProvider)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 12) {
Text(title)
@@ -50,6 +51,7 @@ struct ReadReceiptCell: View {
.lineLimit(1)
}
}
.accessibilityElement(children: .combine)
.padding(.vertical, 8)
.padding(.horizontal, 16)
}