Skip to content

TextTransformControl/TextDecorationControl: Balancing usability and accessibility #36735

@mirka

Description

@mirka

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.

Text Transform and Text Decoration controls

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.

Any ideas or thoughts? (cc @ciampo @diegohaz)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions