[dev-v5][Docs] Add placeholder autofill docs from v4#4664
[dev-v5][Docs] Add placeholder autofill docs from v4#4664MarvinKlein1508 wants to merge 2 commits intomicrosoft:dev-v5from
Conversation
| @@ -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. | |||
There was a problem hiding this comment.
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.
- placeholder text can influence autofill
- autocomplete="off" is not reliable
- Avoid semantic placeholder values if autofill is undesired
- Disabling autofill requires browser-level user settings, not HTML
Source:
- https://css-tricks.com/almanac/pseudo-selectors/a/autofill/
- https://www.w3tutorials.net/blog/how-does-form-auto-filling-in-the-browser-work/
- https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:autofill
- https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Turning_off_form_autocompletion
- https://www.microsoft.com/edge/features/autofill
There was a problem hiding this comment.
Agreed. No need to explain that here
There was a problem hiding this comment.
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.
I’m not opposed to adding this information to clarify things for certain developers. My only other suggestion, then, is to place the PlaceholderAutofill.md file in the TextInput folder, which is more appropriate, to avoid putting it in the root of Components. And rename it to ChapterPlaceholderAutofill.md or SectionPlaceholderAutofill.md to clarify this is not a page.
There was a problem hiding this comment.
Yes. I placed it on the root as the same concept applies for FluentCombobox and FluentAutocomplete. What if we add a Shared folder in the root which holds this kind of docs.
| @@ -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. | |||
There was a problem hiding this comment.
Agreed. No need to explain that here
Pull Request
📖 Description
This PR adds the missing placeholder autofill docs from v4.
👩💻 Reviewer Notes
Not sure about the position where I put the actual markdown file. Maybe we wanna have a shared folder?
✅ Checklist
General
Component-specific
⏭ Next Steps
This docs needs to be added to the
FluentAutocompletedocs as well.