You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib/components/TextInput/TextInput.js
+61-30Lines changed: 61 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,17 @@ import classnames from "classnames";
53
53
required [Boolean] - Mark the input as required in a form.
54
54
step [Number] - The step attribute of the input element.
55
55
type [String] - The type of input element. Defaults to "text". One of "date", "datetime-local", "email", "month", "number", "password", "range", "search", "tel", "text", "time", "url", or "week".
56
-
value [Boolean] - Whether or not the checkbox is checked. Defaults to false.
56
+
value [String] - Value of the text input
57
+
isFocused [Boolean] - prop to control aria-live behavior
58
+
59
+
60
+
* Accessibility features:
61
+
* - Uses `aria-describedby` to link input with its feedback and helper text.
62
+
* - Uses `aria-live="assertive"` or `polite` on feedback to announce changes via screen readers.
63
+
* - Uses `role="alert"` for screen reader announcement of dynamic feedback.
64
+
* - Dynamically sets a `key` on feedback container to force DOM update and screen reader re-announcement.
65
+
* - Limits announcements to only the input currently in focus using the `isFocused` prop.
0 commit comments