Page MenuHomePhabricator

ButtonSelectWidget (ButtonOptionWidget) should receive a custom focus appearance
Closed, ResolvedPublic8 Estimated Story Points

Description

The ButtonSelectWidget (internally ButtonOptionWidget) currently –as of v0.16.6– receives browser's default focus appearance and should follow button focus states.

Before
T133429 ButtonSelectWidget focus OOjs UI Demos 2016-04-22.png (391×294 px, 31 KB)
After
OOjs UI Demos 2016-04-29 14-01-30.png (315×250 px, 23 KB)

Buttons, ButtonGroupWidget and ButtonSelectWidget of v0.16.6 in focus state

Event Timeline

See also T107360 (not a blocker to this, but an interesting related task).

Change 284994 had a related patch set uploaded (by VolkerE):
MediaWiki theme: Align ButtonSelectWidget :focus state with other widgets

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

I think we should make it look as if the currently selected option in the select widget has focus, and not the whole widget. This would probably be more consistent with how native interfaces behave, and as a bonus should be straightforward to implement.

The only problem is what to do if none of the options is selected… Given that select widgets don't generally allow the user to deselect all options, I don't think this is very important to worry about. We could just select one of the options on focus and avoid this problem.

@Volker_E, I'm going to take this over, I have a fairly good idea in my head how to implement this. I'll make it depend on your ButtonElement focus standardization (https://gerrit.wikimedia.org/r/#/c/285411/).

@matmarex Sounds excellent to me! Looking forward to your patch. :)

Change 285667 had a related patch set uploaded (by Bartosz Dziewoński):
MediaWiki theme: Custom :focus state for SelectWidgets

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

Change 285667 merged by jenkins-bot:
MediaWiki theme: Custom :focus state for SelectWidgets

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

Jdforrester-WMF moved this task from Doing to OOjs-UI-0.17.1 on the OOUI board.
Jdforrester-WMF edited projects, added OOUI (OOjs-UI-0.17.1); removed OOUI.
Jdforrester-WMF removed a project: Patch-For-Review.
Jdforrester-WMF set the point value for this task to 8.

Change 284994 abandoned by VolkerE:
MediaWiki theme: Align ButtonSelectWidget :focus state with other widgets

Reason:
Fixed in https://gerrit.wikimedia.org/r/#/c/285667/

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