Csaba Szugyiczki
07/23/2025, 8:27 AMOutlinedTextField
nor TextField
sets up additional accessibility info such as label or any additional info like placeholder value or supportingText, on iOS. Meanwhile on Android these are handled well.
Is there something I miss, or is it intentionally so minimally supported on other platforms?Csaba Szugyiczki
07/23/2025, 8:28 AMvar textFieldValue by remember { mutableStateOf(TextFieldValue()) }
OutlinedTextField(
modifier = Modifier.fillMaxWidth()
.padding(vertical = 16.dp)
.semantics {
contentType = ContentType.EmailAddress
},
value = textFieldValue,
onValueChange = { newValue -> textFieldValue = newValue },
label = { Text("Email") },
supportingText = { Text("Enter a valid email address") },
placeholder = { Text("<mailto:example@example.com|example@example.com>") }
)
Csaba Szugyiczki
07/23/2025, 8:30 AMAndrei Salavei
07/23/2025, 8:52 PMCsaba Szugyiczki
07/24/2025, 7:56 AM@State private var email: String = ""
TextField("Email", text: $email)
.textFieldStyle(RoundedBorderTextFieldStyle())
.keyboardType(.emailAddress)
.autocapitalization(.none)
.disableAutocorrection(true)
Csaba Szugyiczki
07/24/2025, 8:25 AMCsaba Szugyiczki
07/28/2025, 10:59 AM