Skip to content

Components: label multiple / composed inputs correctly #42630

@ciampo

Description

@ciampo

What problem does this address?

For more context: this topic was first pointed out in #42118 (comment) and #42095, and recently discussed in #42351 (review)

There are a few instances in the @wordpress/components package where multiple input elements are combined into higher-level components without appropriate labelling.

As established in previous conversations (see links above) and in w3c's official documentation, the most correct way would be to associate related inputs by wrapping them in a fieldset elements, while keeping individual labels for each single input.

The challenge in doing so is to avoid nested fieldsets when composing components which already internally group multiple inputs. For example:

What is your proposed solution?

We should come up with a solution that can be applied systematically across all *Control components.

Metadata

Metadata

Labels

[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Components/packages/components

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions