Page MenuHomePhabricator

ButtonSelectWidget can't be read when disabled
Closed, ResolvedPublic

Assigned To
Authored By
Esanders
Feb 25 2019, 11:57 AM
Referenced Files
F28284842: image.png
Feb 25 2019, 10:18 PM
F28284839: image.png
Feb 25 2019, 10:18 PM
F28282767: image.png
Feb 25 2019, 6:38 PM
F28282764: image.png
Feb 25 2019, 6:38 PM
F28281548: image.png
Feb 25 2019, 11:57 AM

Description

Most widgets can still be read when disabled (e.g. checkboxes, radios, input widgets, dropdowns), but there is no distinct styling for a pressed+disabled buttons, so you can't tell which button in selected when the widget is disabled:

image.png (71×252 px, 6 KB)

This is needed for VE's read-only mode where users should be able to inspect document state.

Event Timeline

Volker is going to hate this… :)

Change 492746 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] Add styling for disabled active buttons

https://gerrit.wikimedia.org/r/492746

I kind of hacked together some styles, I don't think we have a design for this…

image.png (147×236 px, 8 KB)
image.png (132×203 px, 9 KB)

Ouch, read-only vs disabled, hmm? One immediate issue I see with just changing opacity– it fails on a contrast ratio level.

By the HTML spec, read-only is for inputs, and prevents you from changing the 'value' property. We are free to ignore this, but for most non-text widgets, readonly vs disabled would be the same.

it fails on a contrast ratio level.

@matmarex can you add "before" screenshots, to see if there are accessibility regressions?

I'm not sure what you mean, there was no styling for this mode before… the active button looked just like the other disabled buttons.

Before
image.png (142×233 px, 8 KB)
image.png (127×200 px, 9 KB)

I note that WikimediaUI theme disabled buttons don't meet AA or AAA contrast guidelines. My proposed styling for disabled active buttons doesn't meet them either (but it's closer).

Volker_E triaged this task as Medium priority.
Volker_E moved this task from Reviewing to OOUI-0.30.4 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.30.4); removed OOUI.
Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.

Change 492746 merged by jenkins-bot:
[oojs/ui@master] ButtonElement: Add styling for disabled active framed buttons

https://gerrit.wikimedia.org/r/492746

Change 494883 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.30.4

https://gerrit.wikimedia.org/r/494883

Change 494883 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.30.4

https://gerrit.wikimedia.org/r/494883