Skip to content

HTML: Allow activation of a checked radio button to clear it #1452

Description

@hjanuschka

Specification title

HTML: Allow activation of a checked radio button to clear it

Specification or proposal URL (if available)

whatwg/html#12480

Explainer URL (if available)

whatwg/html#12480

Proposal author(s)

@hjanuschka

web-feature id

None.

MDN URL

None.

Caniuse.com URL

None.

Bugzilla URL

Not yet filed.

Mozillians who can provide input

None identified.

WebKit standards-position

WebKit/standards-positions#721

Other information

The proposal changes radio-button activation so that activating the currently checked radio button can return an optional radio group to its no-selection state. If the group has a radio button with a checked content attribute, activation instead restores that author-provided default.

The use case is an optional form question where a user accidentally selects an answer and currently has no native way to return the group to its initial no-selection state. Radio groups already support no selection initially and through script; the proposal makes that state reachable through user activation.

Demo: https://static.januschka.com/i-40761596/index.html

Chromium tracking issue: https://issues.chromium.org/issues/40761596

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions