Skip to content

Adding Password Component - #1946

Open
shravani-0811 wants to merge 948 commits into
devfrom
password-component
Open

shravani-0811 wants to merge 948 commits into
devfrom
password-component

Conversation

@shravani-0811

@shravani-0811 shravani-0811 commented Aug 6, 2026 •

Copy link
Copy Markdown
Collaborator

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?

  • Java unit tests (TextInputImplTest): field type resolution (fieldType=password → getFieldType()/getExportedType()), isShowHidePasswordEnabled() default-true and author-disabled cases, and .model.json export shape via testJSONExport.
  • Cypress authoring tests (passwordinput.authoring.cy.js): dropping the component into a form container / responsive grid via the editor sidebar, and opening its edit dialog.
  • Cypress runtime tests (passwordinput.runtime.cy.js): model/view initialization, masked-by-default rendering, clicking the eye icon reveals plaintext and toggles aria-pressed/aria-label (and back), toggle button absent when showHidePassword is disabled, value submits correctly regardless of toggle state, minLength/mandatory validation messages, description/tooltip toggling, and aria-disabled absence when disabled.
  • Manual verification: deployed to a local AEM SDK author instance; confirmed the component appears in the standard Adaptive Form component sidebar and renders/toggles correctly (masked ↔ plaintext, aria-pressed flips) in the disabled/preview rendering path.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

rismehta and others added 30 commits January 27, 2025 10:35
Disabling old core component build since core component is part of cl…
rismehta and others added 13 commits June 20, 2026 20:30
* FORMS-23760 : Added Table component support in Core Components  (#1879)

* added basic config files for the table component

* added .content.xml for the table component

* added edit toolbar for the table component _cq_editConfig.xml

* added table.html

* added basic css and js for the table authoring currently refering the dependencies which are declared in the content.xml

* added site clientlibs for the table component

* added basic config files for the tableheader

* added basic config files for the tablerow

* added site clientlibs for tableheader

* added clientlibs folder in the tablerow

* added the table component in examples folder along with cq_template

* added runtime dependencies in the runtime all for the table component

* replaced the tr elements from the div elements to fix the selecting issue

* added action configs in the edit toolbar for the table component

* added action configs for the table row and the tableroweditorhook.js for handling this

* removed the add row option from the tableHeaderRow

* updated the header cells from the textinput to text type in the templates

* added the addCol and deleteCol actions and also there handlers

* removed cell numbers from dynamic addition of the table cols and rows

* added the feature of repeatable panels to the table row at runtime

* added the replace feature for the tablecell to any component which is present

* removed the delete options from the table cells in the table row

* in this commit table tags have gone -> repeatable panels not working correctly here

* added files to fix the repeatative panels with the table tags

* fixed the repeatable rows with indexing

* changed the authoring from divs to tabletags sacirificing the touch ui for now

* fixed the touch ui with the table tags

* fixed the tablecell css having controls

* removed the tableeditor.css file

* added replace feature to the components of the table Header also

* fixed the refresh issue by adding authoring dialogs for table row and table header

* added cypress tests and collaterals for testing

* added sling folder for collaterals

* fixed the test cases

* fixed the content.xml

* fixed the failing testcases

* updated the year to 2026

* fixed the short and long description for the table component

* removed unsupported authoring from the table component

* refactored the table.html

* updated README for the table Component

* Resolved Conflicts

* added sorting feature for the table component

* enabled sorting button during authoring too

* added feature to disable/enable sorting on a particular column of the table

* added authoring options for sorting and column width

* added dor support for table component

* added dor testing

* added the feature of merge and split cell during runtime by adding colspan in publish html

* updated README for table, tableheader, tablerow

* added the feature for merge row cells and commented out the header cells merge feature

* added testing for second phase features

* fixed review comments 1

* fixed review comments 2

* fixed cypress tests

* fixed coverage

* fixed the sorting behaviour to improve the archaic behavior

* fixed cypress testing mergesplit feature

* fixed cypress testing

* moved .css changes from core component to theme canvas

---------

Co-authored-by: Armaan Gupta <armaang@Armaans-MacBook-Pro.local>

* FORMS-24585 AEP submission changes (#1911)

* Fix code formatting for FormContainerImpl.java (#1914)

* FORMS-24585 Adding sandboxname in config (#1917)

Co-authored-by: shraddhasingh683 <shraddhasingh683@gmail.com>

* Double MB fix in validation alert pop up for file size (#1918)

* file input upload error fix

* double MB java change reverted

---------

Co-authored-by: Rajat Khurana <rajatkhurana@adobe.com>

* feat: FORMS-25252 add server-side validation (SSV) (#1902)

* feat(af-core): FORMS-25252 add server-side validation (SSV) for form container

* fix(ssv): gate SSV dialog behind FT_FORMS-25252 feature toggle

* copy writing fixed for ssv config

---------

Co-authored-by: Rajat Khurana <rajatkhurana@adobe.com>

---------

Co-authored-by: Armaan Gupta <armaang@Armaans-MacBook-Pro.local>
Co-authored-by: shraddhasingh683 <shraddhasingh683@gmail.com>
Co-authored-by: anshikag-adobe <anshikag@adobe.com>
Co-authored-by: Rajat Khurana <30727855+rajatofficial@users.noreply.github.com>
Co-authored-by: Rajat Khurana <rajatkhurana@adobe.com>
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

1 similar comment
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@rismehta rismehta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check comments

@shravani-0811
shravani-0811 changed the base branch from master to dev September 16, 2026 05:39

@rismehta rismehta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up review — additional pending items

Reviewed the current state (head e06b28f). The refactor to a dedicated PasswordInput model resolved earlier comments #1 (fd:-prefixed headless property), #3 (isolate contract from TextInput), and #5 (clientlib category). Comments #4 (no input listener → no as-you-type validation) and #6 (numeric/alphanumeric restriction config) remain open.

Below are new items not previously flagged. A/B/C are posted as inline comments; two more here:

[LOW] Automated a11y violations pending triage — the adobe-bot scan lists aria-required-attr (critical), label-title-only (serious), target-size (serious), empty-heading (minor). target-size maps to the toggle-button finding (inline on the CSS). Please triage which of the others are attributable to passwordinput vs. the IT harness.

[LOW / verify] Cross-repo runtime support for fieldType=password — confirm the AF runtime instantiates the correct field model for fieldType: "password" and that minLength/maxLength/pattern validation fires (it should be treated as a string field via StringConstraint). Not blocking this repo, but worth validating before shipping.

Verified OK: FieldType.PASSWORD already exists (compiles); both runtime aggregators (-all and -all-xfa) were updated with passwordinput.v1.runtime; getProperties()/fd: override matches peer impls; passwordinput.js editor clientlib matches textinput.js; toggle aria-pressed/label logic is correct; no password default-value leakage in the exported model.

Verdict: Request changes — A, B, C plus open #4 to resolve before merge; D/E and #6 are follow-up.

Reviewed with Claude Code + Scout.


}

.cmp-adaptiveform-passwordinput__toggle-visibility {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Show/hide toggle has no default affordance — invisible and fails target-size.

This __toggle-visibility rule is empty and the <button> carries no icon/text, so it collapses to roughly 0×0. Unlike an <input>/checkbox (which have intrinsic UA dimensions), an empty button is invisible and not operable by a real user out of the box — which is also why the tests can only click it via Cypress DOM (see my README thread). The a11y bot's target-size (serious) violation corroborates this. The 'ship unstyled BEM placeholder' convention is fine for widgets with intrinsic size, but the toggle needs at least a minimal default hit-target/visible affordance (≥24×24), otherwise the feature is unusable without consumer CSS.

Reviewed with Claude Code + Scout.

@rismehta rismehta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up: one exporter-test coverage gap on the password model.

Reviewed with Claude Code + Scout.

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rms/core/components/models/form/PasswordInput.java 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.