Skip to content

add autocomplete arg to passwordInput#669

Open
Elodie-DeMatteis-Upf wants to merge 4 commits into
emd/pyx-111from
edm/pyx-111-2
Open

add autocomplete arg to passwordInput#669
Elodie-DeMatteis-Upf wants to merge 4 commits into
emd/pyx-111from
edm/pyx-111-2

Conversation

@Elodie-DeMatteis-Upf
Copy link
Copy Markdown
Contributor

What does this PR do?

OSS::PasswordInput now supports a new autocomplete optional arg, being set either to on or off. It allows the input to disable its default autocompletion.

Related to: #

What are the observable changes?

With autocomplete undefined
Capture d’écran 2026-05-20 à 11 24 08

With autocomplete="off"
Capture d’écran 2026-05-20 à 11 24 17

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation with Figma design link. Don't forget to replace "design" by "file" in the URL. For example https://www.figma.com/file/example
  • Migrated touched components to Glimmer Components
  • Properly labeled

@Elodie-DeMatteis-Upf Elodie-DeMatteis-Upf self-assigned this May 20, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 20, 2026

PYX-111

Comment thread addon/components/o-s-s/password-input.hbs Outdated
Copy link
Copy Markdown
Member

@Miexil Miexil left a comment

Choose a reason for hiding this comment

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

And missing tests :/

type: {
summary: 'on | off'
},
defaultValue: { summary: 'undefined' }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

defaults to current-password

errorMessage?: string;
feedbackMessage?: FeedbackMessage;
disabled?: boolean;
autocomplete?: 'on' | 'off';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

From the MDN:

The attribute value is either the keyword off or on, or an ordered list of space-separated tokens.

We also had current-password which is now the default autocomplete getter value, and we are setting to new-password when it's off ? 🤔

There's a typing issue for me here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Miexil the new-password thing was discovered a couple sprints ago for EmailInput component, i remember it's because Chrome doesn't really support off but new-password is somehow a value that all browsers settled on for some reason (don't ask me why 😂)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not really questioning the new-password only mentioning that possible values are not only limited to on or off and taking the code from the getter below as an example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, "current-password" will autocomplete the password field to your... well... current password. "new-password" states that the password that will be added is new, so there should not be any autocompletion on this field.
So to recap:

  • Previous behavior was defaulting to "current-password" - that is still the case
  • Adding @autocomplete="off" will use "new-password" to disable the autocomplete

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants