- improved detection of false positives for dynamic type size

- improved also a11y for the knock request message
- improved a11y for reply view
This commit is contained in:
Mauro Romito
2025-07-21 17:51:09 +02:00
committed by Mauro
parent aa84d280bb
commit 46683063c6
39 changed files with 83 additions and 77 deletions

View File

@@ -487,6 +487,7 @@
"screen_join_room_decline_and_block_alert_message" = "Are you sure you want to decline the invite to join this room? This will also prevent %1$@ from contacting you or inviting you to rooms.";
"screen_join_room_decline_and_block_alert_title" = "Decline invite & block";
"screen_join_room_decline_and_block_button_title" = "Decline and block";
"screen_join_room_knock_message_characters_count" = "Allowed characters %1$d of %2$d";
"screen_join_room_knock_message_description" = "Message (optional)";
"screen_join_room_knock_sent_description" = "You will receive an invite to join the room if your request is accepted.";
"screen_join_room_knock_sent_title" = "Request to join sent";

View File

@@ -101,13 +101,14 @@ class AccessibilityTestsAppCoordinator: AppCoordinatorProtocol {
struct PreviewsWrapperView: View {
let wrapper: PreviewsWrapper
@Environment(\.dynamicTypeSize) var dynamicTypeSize
var body: some View {
if wrapper.currentIndex < 0 || wrapper.isDone {
EmptyView()
} else {
wrapper.currentPreview.content
.id(wrapper.previewName)
.id("\(wrapper.previewName)-\(dynamicTypeSize)")
}
}
}

View File

@@ -1594,6 +1594,10 @@ internal enum L10n {
internal static var screenJoinRoomJoinRestrictedMessage: String { return L10n.tr("Localizable", "screen_join_room_join_restricted_message") }
/// Send request to join
internal static var screenJoinRoomKnockAction: String { return L10n.tr("Localizable", "screen_join_room_knock_action") }
/// Allowed characters %1$d of %2$d
internal static func screenJoinRoomKnockMessageCharactersCount(_ p1: Int, _ p2: Int) -> String {
return L10n.tr("Localizable", "screen_join_room_knock_message_characters_count", p1, p2)
}
/// Message (optional)
internal static var screenJoinRoomKnockMessageDescription: String { return L10n.tr("Localizable", "screen_join_room_knock_message_description") }
/// You will receive an invite to join the room if your request is accepted.

View File

@@ -11,7 +11,7 @@ import MatrixRustSDK
extension RoomPreviewProxyMock {
struct Configuration {
var roomID = "1"
var canonicalAlias = "#3🌞problem:matrix.org"
var canonicalAlias = "#3-body-problem:matrix.org"
var name = "The Three-Body Problem - 三体"
var topic: String? = "“Science and technology were the only keys to opening the door to the future, and people approached science with the faith and sincerity of elementary school students.”"
var avatarURL = URL.mockMXCAvatar.absoluteString

View File

@@ -69,8 +69,8 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View {
.foregroundColor(.compound.iconSecondary)
.frame(width: 12, height: 12)
// Increase hit area
.padding(.leading, 10)
.padding(.bottom, 10)
.padding(.leading, 5)
.padding(.bottom, 2)
}
}
}

View File

@@ -131,19 +131,12 @@ struct JoinRoomScreen: View {
}
}
}
private var knockMessageFooterString: String {
guard !context.knockMessage.isEmpty else {
return L10n.screenJoinRoomKnockMessageDescription
}
return "\(context.knockMessage.count)/\(maxKnockMessageLength)"
}
@ViewBuilder
private var knockMessage: some View {
VStack(alignment: .leading, spacing: 12) {
HStack(spacing: 0) {
TextField("", text: $context.knockMessage, axis: .vertical)
TextField(L10n.screenJoinRoomKnockMessageDescription, text: $context.knockMessage, axis: .vertical)
.focused($focus, equals: .knockMessage)
.onChange(of: context.knockMessage) { _, newValue in
context.knockMessage = String(newValue.prefix(maxKnockMessageLength))
@@ -153,6 +146,7 @@ struct JoinRoomScreen: View {
.padding(.horizontal, 16)
.padding(.vertical, 12)
.id(Focus.knockMessage)
.accessibilityHint(L10n.screenJoinRoomKnockMessageCharactersCount(context.knockMessage.count, maxKnockMessageLength))
}
.background(.compound.bgCanvasDefault)
.cornerRadius(8)
@@ -160,11 +154,14 @@ struct JoinRoomScreen: View {
RoundedRectangle(cornerRadius: 8)
.inset(by: 0.5)
.stroke(.compound.borderInteractivePrimary)
.accessibilityHidden(true)
}
Text(knockMessageFooterString)
Text("\(context.knockMessage.count)/\(maxKnockMessageLength)")
.font(.compound.bodySM)
.foregroundStyle(.compound.textSecondary)
// We will have a hint for this in voice over mode
.accessibilityHidden(true)
}
}

View File

@@ -97,6 +97,7 @@ struct TimelineReplyView: View {
var body: some View {
ReplyView(sender: .init(id: "@alice:matrix.org"), plainBody: "Hello world", formattedBody: nil)
.redacted(reason: .placeholder)
.accessibilityLabel(L10n.commonLoading)
}
}
@@ -129,6 +130,7 @@ struct TimelineReplyView: View {
.foregroundColor(.compound.iconPrimary)
.background(Color.compound.bgSubtlePrimary)
.cornerRadius(icon?.cornerRadii ?? 0.0, corners: .allCorners)
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 2) {
Text(sender.disambiguatedDisplayName ?? sender.id)
@@ -145,6 +147,7 @@ struct TimelineReplyView: View {
.padding(.leading, icon == nil ? 8 : 0)
.padding(.trailing, 8)
}
.accessibilityElement(children: .combine)
}
@ViewBuilder

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28db151fcbd2267b1c7086648a54c715396f335692d299dd54d41d1ca4cc80de
size 207748
oid sha256:7517ce4f904f7e8db36995817f1a7b5143f1e2f7c3f266323266481cc17ad7e7
size 204272

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5f40bf61fcd6db2ca782e89d5854c074fea061efd90e12021f12a7000bdac0bc
size 218460
oid sha256:1777b73fad23b2790daa0536bc5c3d0c474fce62ec615a271a5313e597e9352a
size 214984

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c1ff99359eaa65971b9223aa477d38daa09d45ee93a9a96fd2060a238ab9d896
size 163191
oid sha256:999709d4b98c7e8c63a9e81e044161d74a7e27431fbbe7020346ed7ae6d8a5d5
size 159354

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd34bfa6be2bc8401055e54b907a46f1ca4589bb7de50654b2bfad6e3d1f5299
size 177578
oid sha256:9891d566345fdcdc23b3dabcd7ff8375c72161202900061a6c27211a8ae84ff2
size 173741

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d03df608291d9b2fe88e6074ad1c84050a7116a503f2c3bbffdacd5a24a80a98
size 207719
oid sha256:08aae02a23942fd31d7b0b8baecaa03ec53a598218ab171884565bd82980ceb5
size 204243

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9bdb21293e57edc076eb072e7ecbd83f6aee939a0085c98629a0c2b2cc206d90
size 220604
oid sha256:948c1949e414b7d929b11ea4cf09b2f9eab092a24d98c82a2932dfe277e79e8e
size 217128

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a91beb34039fb2cc1debb398945039d3a342100bdf4aa55997bc483c5beacdce
size 163080
oid sha256:c1f165196417cb2bccf27623250687b80e64c1057e298a44491867e8295d159a
size 159243

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9cac352c1a41b9511ba91ad8516e2002a613808e52bab612d3370332f027f597
size 181538
oid sha256:cf340412259f3d8e5366c9bbc59c97d678723809ae3702eddaea7604a012ae66
size 177701

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0897a6029f8bd77e50e76623bec743418dce96599680ce98c93313f772d91200
size 191610
oid sha256:7a04e3bb5f98d5d507fc109aac61ff1c0374f32bf63b0ad95b366bacc7669396
size 188134

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b54e1d6d61b7eea5e4485cd9a47fb1494fd8aaad514093be6c95ab0f4723651f
size 197679
oid sha256:5819f6b04d6aad765467ecadccde38ac80dbdcae978241ded4940a4e3dddd0c5
size 194203

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fadc40b96d3d5384cba6cccb8fd55989c211559e4d1a9bfeca7f9683925fc08c
size 149159
oid sha256:2f271b7c81e104e8e444dc6da8adb87433873e90ba50f2b48c17868902e82373
size 145322

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:53c6d6ea275d7ee627fa0c475d76a8b23a7f5631896a796fa6ac4d01f9ffd56a
size 157734
oid sha256:d1f40c11dfe00710336e2159241dbfb701a92b770ff452a41c8a5c05b2922557
size 153897

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a917fe3378aa2827be43ffa3234fad613badd8617e98ddcd86a6f7f16a6769c1
size 204429
oid sha256:0f3364963c19a9dfe115140683271265b354c952267b114a6286e31fb1fb06b6
size 201392

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31f39bbbf4040cfe1e43a2d0bdbdb348169322af8c7f6f82f1c352f118927725
size 212136
oid sha256:a7a89f555c205155fd57f64603f0b3d769c82258d7640d91aa3b7f539e3cb91b
size 208889

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb8d1fd73fb3ac16c8afdf4a4119b3308f7b382db23294111d7ec7035430dc39
size 160196
oid sha256:3438f7668ab6f572d07e7fada5bb558cd24fbdf617d2d74a6baa232d3c0e2009
size 157288

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:61f1e6efa2e243e44f1522c18a4bccdef2b100cbe327daac0db13de6bb3ebdde
size 169643
oid sha256:bfba4535c2bbf47e96476325f28251879e179344c083155eae65d1a65a5c042f
size 166499

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e48ac576afe10616a3fc165907b9cbbb339574282e7119ca99feb3a2fe97cab
size 138912
oid sha256:0dbe57a6e9b629aa8211fe710c3da82583e84f6ebc7fc18ab4b78de8918be6ea
size 135655

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df6e9ae29e7932212e68e1651fa66d197da947e1bc2030098e41bdb242136595
size 146424
oid sha256:3cec2f0d6b5d55a6c1fbe662da4af2a50e3e5acde2169b6f8858eb6cf772b3c0
size 143166

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c99637ef8a69adfcb861d1896427c01c05ab07a8d33fcf1b277470927b62719
size 91233
oid sha256:59ef5415fffbf3ff0767f083a413ed23f8f91b8e05e291e2b0be89138aade04c
size 87825

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2bc56d6e2ffbe467a30500c94b6b0bdd13665cecc2113e37401798945f8a46e0
size 100605
oid sha256:dceecafcc4141e7d547e9a247683ab7944e27ad1cbde089ee7108a8e9ea0a197
size 97199

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67c73fd272087e1441339ab3e8b0de71fc4ea91864cda73ad8b4eedebff5e12e
size 191074
oid sha256:27823508aef800ee5e601cecc5e96d9e76852504601b281292f7476d1f74a8eb
size 187598

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9a1fd3022ce3a12674a9438720d4886631fb77753ed338dfeaf53e15890d8d65
size 192628
oid sha256:f56f3de7ee2b2e4973011281cb965e4e1056ea99e42c6cbc9be61f8eff002d69
size 189152

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7cd32a02256eb0addaac4951c50e19c8ec241dfb54106c4b5228b57c7869563a
size 146448
oid sha256:eac77fde80089ddbaf7b70355f3d8801ffe3f08e53112d554e47abf3098a3774
size 142611

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e665bb85f3b6ff119fff31edf0292f0bc5c9b60fe02640d8e35517ff8df48b0
size 147937
oid sha256:2309efb8379f8a32c999420d6e9aa3303b73980fc29e3b1a056420f35225642b
size 144100

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3d1b6a6ac2b9050c155f6f71033f25e5454efac4bc656f8d1b6f448b42f02a5
size 203396
oid sha256:e5f349e572d1f643ad57d47644d4080bd532cc3964eb0b793f2bd00f5f904c21
size 201741

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0cf200b4c1cd055fbe6bdd8acc99552b0042c0e4549c8365ae88da414a321ebf
size 205648
oid sha256:4ec6d2be1d2f405daf5a65a5b227fa68831df5e9160b6ab2b8ed9d67a8588665
size 206726

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:73647bd04dcc6aa31270c0f095bb698a3b84dd5818e657af5dbed06075322fea
size 156547
oid sha256:3b2fb3e561ffe5e31b4e9897926582f6e2c7e904b4e74f73f1f6dbc3c2c0f86e
size 154270

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7406d00e6fa716dbffe6a3700d60bd520fcf688aa7fecc99cf823d19f61498a
size 162855
oid sha256:b232ea9859cfb1396e9d34c9d6059ece642e1dfd621ef1e1b4642071557cab41
size 163257

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3fa1c1956af6c30a8f180e3a6fb1787365b3939cbd116b557995fc29742578ad
size 206112
oid sha256:6900adc4cd78f15925863f506021588d33bdd80ed8e4967435a8dc465c3a5c13
size 202636

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f17df9d943904931d6b43278507f2ea9baccaebc3cfd6e42ea978f79a490b51
size 219206
oid sha256:1a846e0d8f7cd1d34aec2e50999d9c10d8e9333e49fc79c360677cf0f16ec5a4
size 215730

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b19ebc30355d9c6ddc6c2981617ad887df0d7d98c362fe2fdb92f6997565dc1
size 163237
oid sha256:32be5633dab85eeddeee7684f82538ead8fe8a8b05cc83269d6633324897557a
size 159400

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1c28068aa6883935698c61648dd132d353ae4211b397a6085311b4350f33c60
size 178198
oid sha256:91c842cb7ceecfd8b8689b8e09ada78d2f5ba354119d0f65ec692931b7e9047b
size 174361