Skip to content

[Selectmenu] Best practices for autofill and <selectmenu> #457

@mfreed7

Description

@mfreed7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageselectThese are issues that relate to the select component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions