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
{{ message }}
Repository navigation
Commit 7938a0d
Browse filesBrowse the repository at this point in the historyBrowse files
Address Bito + CodeAnt review findings on PR #39245:
ControlHeader / NumberControl / TextControl
- ControlHeader accepts an external errorId so wrappers share one DOM id
per control. Previously both ControlHeader and the input wrapper rendered
id="${name}-error" + role="alert", producing duplicate ids and
duplicate screen-reader announcements for the same validation error.
- NumberControl now computes a stable input id via useId when name is
missing, so id="undefined" never hits the DOM.
- The visible inline red error below the input keeps the text but drops
its id and role="alert" — the live-region inside ControlHeader is the
single source of truth for assistive tech.
ModalFormField
- Injecting aria-invalid / aria-describedby on the first child missed
FormItem-wrapped inputs, leaving the real interactive element unlinked
to the error. The traversal now hops through a single-child wrapper to
decorate the wrapped input.
SSHTunnelForm
- Required-field check treated whitespace-only input as valid, letting
users bypass validation with a space. The check now trims before the
emptiness test.
Already addressed in prior commit 3f2a60f on this branch:
- AlertReportModal name/owners error guards against currentAlert loading
- ControlHeader useId fallback for missing name
Not changed:
- RoleNameField — Ant Design FormItem with rules={[{required:true}]}
already sets aria-invalid on the input via FieldContext when validation
fails; the explicit render-prop pattern the bot suggested would nest
FormItems for no behavior gain.
0 commit comments