Skip to content

[dev-v5][Docs] Add placeholder autofill docs from v4#4664

Open
MarvinKlein1508 wants to merge 2 commits intomicrosoft:dev-v5from
MarvinKlein1508:autofill-docs
Open

[dev-v5][Docs] Add placeholder autofill docs from v4#4664
MarvinKlein1508 wants to merge 2 commits intomicrosoft:dev-v5from
MarvinKlein1508:autofill-docs

Conversation

@MarvinKlein1508
Copy link
Copy Markdown
Collaborator

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

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

This docs needs to be added to the FluentAutocomplete docs as well.

@@ -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.
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.

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:

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.

Agreed. No need to explain that here

Copy link
Copy Markdown
Collaborator Author

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 :)

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.

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.

Copy link
Copy Markdown
Collaborator Author

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 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.
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.

Agreed. No need to explain that here

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.

3 participants