Skip to content

Commit 3c98d25

Browse files
MarvinKlein1508dvoituronvnbaaij
authored
[dev-v5][Docs] Add placeholder autofill docs from v4 (#4664)
* Add placeholder autofill docs from v4 * Move to general * Add docs to FluentAutcomplete * Process code review --------- Co-authored-by: Denis Voituron <dvoituron@outlook.com> Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>
1 parent 6848860 commit 3c98d25

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

examples/Demo/FluentUI.Demo.Client/Documentation/Components/List/Autocomplete/FluentAutocomplete.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You can control this behavior by providing the `OptionSelectedComparer` paramete
1515

1616
> **Note:** Accessibility requirements are not yet implemented for this component.
1717
18+
> **Note:** For more information about placeholders and autofill, see this <a href="/TextInput#placeholders-and-autofill">important information</a>
19+
1820
## Keyboard interaction
1921

2022
| Key | Behavior |

examples/Demo/FluentUI.Demo.Client/Documentation/Components/List/Combobox/FluentCombobox.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Entering text will filter options or allow someone to submit a free form answer.
1111
Comboboxes work well in situations where the list of options is very long.
1212
If the list is not very long or you can't accept free form answers, try a **FluentSelect**.
1313

14+
> **Note:** For more information about placeholders and autofill, see this <a href="/TextInput#placeholders-and-autofill">important information</a>
15+
1416
## Default
1517

1618
When no item is selected, a **Placeholder** can be used to describe what should be done.

examples/Demo/FluentUI.Demo.Client/Documentation/Components/TextInput/FluentTextInput.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,31 @@ You cannot modify them dynamically.
122122

123123
You can set the `TextInputType` property to define the type of the text input. This relies on browser supplied support for the different types and can therefore vary between browsers.
124124

125-
126125
{{ TextInputTypes }}
127126

127+
## Placeholders and autofill
128+
129+
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.
130+
It is displayed when the input field is empty and not focused.
131+
132+
The placeholder value affects the autofill suggestion feature in Microsoft Edge and Google Chrome.
133+
Even if you set the `AutoComplete` parameter to `off`, the browser may still display autofill suggestions based on the placeholder value.
134+
135+
There are certain placeholder values which you should avoid to prevent the browser from showing autofill suggestions.
136+
137+
| Value (Placeholder/Name) | Description |
138+
|--------------------------|--------------------------------------|
139+
| `name`, `full name`, `first name`, `last name`| Personal name fields |
140+
| `email`, `e-mail`, `mail`| Email address fields |
141+
| `address`, `street`, `city`, `zip`, `postal`| Address and postal code fields |
142+
| `phone`, `tel`| Phone number fields |
143+
| `username`, `user`, `login`| Username or login fields |
144+
| `password`, `pwd`| Password fields |
145+
| `dob`, `birthdate`, `date of birth`| Date of birth fields |
146+
| `cc`, `card number`, `credit card`| Credit card fields |
147+
148+
If you still want to use these placeholder values, then you need to disable autofill in your browser settings completely.
149+
128150
## API FluentTextInput
129151

130152
{{ API Type=FluentTextInput }}

0 commit comments

Comments
 (0)