IS-11368 LWA: forward HaapiBaseFormField.required to rendered field inputs#200
Merged
aleixsuau merged 5 commits intoMay 27, 2026
Conversation
luisgoncalves
requested changes
May 25, 2026
vahag-curity
requested changes
May 26, 2026
Contributor
|
Acceptance-criteria conflict The Jira ticket itself codifies the wrong semantics ("When field.required is falsy (undefined, false, 0, '', null), no required attribute is present"). |
Flip the runtime semantics from `!!field.required` to `field.required ?? true`
on the four visible field UIs (text, password, select, checkbox). Matches the
JSDoc on HaapiBaseFormField.required ("Defaults to true.") and reflects the
production reality that most LWA form fields are required.
Update HaapiStepperFormUI.spec.tsx to keep `createLoginFormAction()` mirroring
production (no `required: false` overrides) and instead fill the fields each
test actually needs to clear via per-field helpers (fillUsername, fillPassword,
selectCountry, checkRememberMe).
vahag-curity
approved these changes
May 26, 2026
luisgoncalves
approved these changes
May 26, 2026
Contributor
Author
Thanks for catching this, fixed ✅ |
…8-required-attr-form-fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira: https://curity.atlassian.net/browse/IS-11368
Context
The HAAPI type
HaapiBaseFormFieldcarries an optionalrequired?: booleanproperty (seeui-kit/src/login-web-app/src/haapi-stepper/data-access/types/haapi-form.types.ts, lines 66-77).Today the four LWA visible-field components do not forward this to the underlying DOM element, so the browser never performs basic constraint validation and AT users do not receive the
aria-requiredsemantics implied by the HTML attribute.This PR wires
requiredthrough to the rendered input/select on the four visible-field components in the haapi-stepper.Tests
New
HTML required attributedescribe block inHaapiStepperFormUI.spec.tsxcovers:field.required: true→ DOMrequiredis present on text, password, select, checkbox.field.required: false→ DOMrequiredis absent.field.required: undefined(omitted) → DOMrequiredis absent.