-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Labels
[Feature] Component SystemWordPress component systemWordPress component system[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] DiscussionFor issues that are high-level and not yet ready to implement.For issues that are high-level and not yet ready to implement.
Description
There has been some complications in finding the correct implementation for the TextTransformControl
and TextDecorationControl
components (e.g. #26060 #31623). It seems like the difficulty is in making the implementation semantically correct, while also being intuitively usable for sighted users.
Considered implementations
Pros | Cons | |
---|---|---|
Radio (ToggleGroupControl) | Mutually exclusive | Cannot re-click to reset (or requires a separate "default" option) |
Group of buttons | Can click to reset | Not mutually exclusive |
Rely on ToolsPanel reset | Can use Radio | Not intuitive |
The options items are mutually exclusive, which makes them similar to a radio control. But we also want an intuitive way to reset the control, which is currently achieved by clicking the active item again. We can't implement this behavior onto a radio control because radio buttons are expected to be idempotent.
On the other hand, a mere array of buttons, even if role="group"
ed, fails to semantically capture the mutual exclusivity of the options.
Metadata
Metadata
Assignees
Labels
[Feature] Component SystemWordPress component systemWordPress component system[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] DiscussionFor issues that are high-level and not yet ready to implement.For issues that are high-level and not yet ready to implement.