mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
- 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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user