openui / openui/open-ui

[Selectmenu] Best practices for autofill and <selectmenu>

Open
#457 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triage select
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.