Skip to content

CheckboxControl, RadioControl, ToggleControl: Support accessible, flexible layouts #60799

@mirka

Description

@mirka

What problem does this address?

CheckboxControl, RadioControl, and ToggleControl do not properly support our layout needs, and developers are forced to roll their own solutions or override the component in fragile ways, which can result in slower iteration speeds and accessibility issues.

Examples of the problems we're encountering

CheckboxControl

RadioControl

ToggleControl

What is your proposed solution?

This can potentially be addressed in multiple ways, so we need to assess what is the best way forward. Possible approaches include:

  • Improve the documentation (e.g. Storybook examples) so that they show how to accessibly implement common custom layouts.
  • Moving to a more modular API based on subcomponents, taking inspiration from (or directly use) Ariakit components.
  • Keeping the current APIs, but also exporting more modular subcomponents like we do with BaseControl.VisualLabel. This must be coupled with clear usage guidance for accessibility.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions