[Selectmenu] Best practices for autofill and <selectmenu>
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 4.5k
- Forks
- 226
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 4
Description
The <selectmenu> proposal allows for arbitrary HTML within the contained <option>s. Further, it allows the developer to fully replace big chunks of the anatomy including the button and the listbox.
Given the large amount of customization that is possible for <selectmenu>, it would seem that we need fairly clear developer guidance on how to ensure that a given <selectmenu> works well with browser autofill systems. For example, what if an address form's <selectmenu> for choosing a State was implemented like this?
<selectmenu id=state>
<option>
<svg><text>Alabama</text></svg><img src=alabama_flag.png>
</option>
<option>
...
I.e. the <option>s here only contain SVGs and images, and no (non-foreign-context) text nodes. Will the browser's autofill system be able to find the "Alabama" option?
@una @stubbornella @battre
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked selectmenu explainer first, then investigate how its customizable option content interacts with browser autofill, especially the SVG-only Alabama example. Done means documenting clear guidance for authors on making customized selectmenus discoverable and compatible with autofill.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation, frontend
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100