Skip to content

The list attribute is missing from many input element types #5330

Closed

Description

@valadaptive
  • Check if updating to the latest Preact version resolves the issue

Describe the bug

Preact 11's TypeScript definitions do not recognize the list attribute on many valid <input> element types.

Per MDN:

It is valid on text, search, url, tel, email, date, month, week, time, datetime-local, number, range, and color.

However, Preact 11's dom.d.ts typings only recognize it on text, search, url, tel, and email.

In particular, the list attribute is the recommended way to get "tick marks" on an <input type="range"> slider, which Preact 11 does not recognize.

To Reproduce

Steps to reproduce the behavior:

  1. Write a Preact component which includes an <input type="range" list={...}>, where the list attribute references some <datalist>'s ID (probably via useId)
  2. Observe that the list attribute is not recognized.

Expected behavior

The list attribute should be recognized on all input types for which it is officially supported.

Activity

  1. rschristian commented on Oct 25, 2026

    @rschristian
    Member

    Wasn't intentional, was just a mistake when building out the accessible role stuff.

    PRs welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions