Skip to content

Commit 21e658f

Browse files
fix: a11y text input incorrect reading order (#491)(#449)
* fix: reorder the reading * fix: exclude prefix icon role, add trailing icon button role and description * review: accessibility * chore: update labels * chore: fix merge --------- Co-authored-by: nhammami <[email protected]>
1 parent dbab2c2 commit 21e658f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ouds_core/lib/components/form_input/ouds_text_input.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ class _OudsTextInputState extends State<OudsTextField> {
240240
final statusLabel = !isEnabled
241241
? l10n?.core_common_disable_a11y ?? ""
242242
: isReadOnly
243-
? l10n?.core_common_disable_a11y ?? ""
244-
: "";
243+
? l10n?.core_common_disable_a11y ?? ""
244+
: "";
245245

246246
// Build Semantics value
247247
final semanticsValue = [
@@ -252,12 +252,15 @@ class _OudsTextInputState extends State<OudsTextField> {
252252
suffixText,
253253
helperText,
254254
statusLabel,
255-
].where((s) => s != null && s.isNotEmpty).join(", ");
255+
]
256+
.where((s) => s != null && s.isNotEmpty)
257+
.join(", ");
258+
256259

257260
return Semantics(
258-
textField: true,
259261
label: semanticsValue,
260262
hint: widget.decoration.hintText,
263+
value: isError ? l10n?.core_common_onError_a11y : null,
261264
focused: effectiveFocusNode != null,
262265
focusable: true,
263266
child: Container(

0 commit comments

Comments
 (0)