-
Notifications
You must be signed in to change notification settings - Fork 469
[dev-v5][Docs] Add placeholder autofill docs from v4 #4664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MarvinKlein1508
wants to merge
2
commits into
microsoft:dev-v5
Choose a base branch
from
MarvinKlein1508:autofill-docs
base: dev-v5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+28
β1
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
20 changes: 20 additions & 0 deletions
20
examples/Demo/FluentUI.Demo.Client/Documentation/PlaceholderAutofill.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| The `Placeholder` parameter is used to set the placeholder text for the input field. This is a short hint that describes the expected value of the input field. | ||
| It is displayed when the input field is empty and not focused. | ||
|
|
||
| The placeholder value affects the autofill suggestion feature in Microsoft Edge and Google Chrome. | ||
| Even if you set the `AutoComplete` parameter to `off`, the browser may still display autofill suggestions based on the placeholder value. | ||
|
|
||
| There are certain placeholder values which you should avoid to prevent the browser from showing autofill suggestions. | ||
|
|
||
| | Value (Placeholder/Name) | Description | | ||
| |--------------------------|--------------------------------------| | ||
| | `name`, `full name`, `first name`, `last name`| Personal name fields | | ||
| | `email`, `e-mail`, `mail`| Email address fields | | ||
| | `address`, `street`, `city`, `zip`, `postal`| Address and postal code fields | | ||
| | `phone`, `tel`| Phone number fields | | ||
| | `username`, `user`, `login`| Username or login fields | | ||
| | `password`, `pwd`| Password fields | | ||
| | `dob`, `birthdate`, `date of birth`| Date of birth fields | | ||
| | `cc`, `card number`, `credit card`| Credit card fields | | ||
|
|
||
| If you still want to use these placeholder values, then you need to disable autofill in your browser settings completely. | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked to Copilot and his answer is here. So, do we need to explain the default HTML behaviors? To discuss.
The behavior you describe applies to native HTML elements as well.
Browsers use heuristics to decide when to show autofill suggestions, and those heuristics are not limited to autocomplete. Placeholder text is one of the signals that can influence autofill.
Source:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. No need to explain that here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to have as this can save us some issues getting raised. I remember that we spent quite some time on figuring this one out.
See #3899 even javiercn had to do some research on this dotnet/aspnetcore#62296
Having it in the docs also means we have this details in the MCP server :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iβm not opposed to adding this information to clarify things for certain developers. My only other suggestion, then, is to place the
PlaceholderAutofill.mdfile in theTextInputfolder, which is more appropriate, to avoid putting it in the root ofComponents. And rename it toChapterPlaceholderAutofill.mdorSectionPlaceholderAutofill.mdto clarify this is not a page.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I placed it on the root as the same concept applies for
FluentComboboxandFluentAutocomplete. What if we add a Shared folder in the root which holds this kind of docs.