Adding Password Component - #1946
Open
shravani-0811 wants to merge 2 commits into
Open
Conversation
Accessibility Violations Found
|
1 similar comment
Accessibility Violations Found
|
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.
Description
Adds a new **Adaptive Form Password Input ** core component: a masked
<input type="password">field with an optional show/hide visibility toggle button.Related Issue
Motivation and Context
Adaptive Forms didn't have a first-class password field: authors had to repurpose Text Input, which offers no masking, no visibility toggle, and no autofill-attribute control suited to credentials. This adds that as a proper, accessible core component while closing off the plaintext-exposure trap that comes from naively inheriting Text Input's "default value" behavior for a password-typed field.
How Has This Been Tested?
TextInputImplTest): field type resolution (fieldType=password→getFieldType()/getExportedType()),isShowHidePasswordEnabled()default-true and author-disabled cases, and.model.jsonexport shape viatestJSONExport.passwordinput.authoring.cy.js): dropping the component into a form container / responsive grid via the editor sidebar, and opening its edit dialog.passwordinput.runtime.cy.js): model/view initialization, masked-by-default rendering, clicking the eye icon reveals plaintext and togglesaria-pressed/aria-label(and back), toggle button absent whenshowHidePasswordis disabled, value submits correctly regardless of toggle state, minLength/mandatory validation messages, description/tooltip toggling, andaria-disabledabsence when disabled.aria-pressedflips) in the disabled/preview rendering path.Screenshots (if appropriate):
Types of changes
Checklist: