Page MenuHomePhabricator

Focus modal CTAs instead of publish button
Closed, ResolvedPublic

Description

GIVEN the user clicked the edit button
WHEN the user is not logged in and the IP warning overlay is shown (T221831)
THEN none of the overlay buttons are focused, and the login button is the next in tab order (i.e. can be focused by using the keyboard tab key once)

Event Timeline

@Hanna_Petruschat_WMDE I had another brain wave - please verify that the latter part also makes sense.

I wonder how that interacts with the focus of input fields. I would assume, that the first text input field is focused rather than the publish button?

@Hanna_Petruschat_WMDE We can certainly do that (at +/- identical effort). The proposal was based on the idea of "returning to a state as if the overlay did not happen", i.e. returning control to the user where we interrupted her. Without the overlay the "publish" button would be focused, hence the proposal. Please mend as you see fit!

@Pablo-WMDE Thanks for the input. I was under the assumption, that the input field will be in focus if there is no pop up. I remember discussing it earlier but I do not remember when and under which task. @Lea_WMDE Do you remember if there has been a concious decision made?

The issue we were talking about is thie following one (now reflected in this one: T223875)

GIVEN the IP warning overlay is shown (T221831)
WHEN the clicks on the "edit without logging in" button
THEN the overlay closes & the "publish" button is focused (keyboard wise)

Change 511396 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[wikibase/termbox@master] Focus login button on entering Editmode

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

Change 511396 merged by jenkins-bot:
[wikibase/termbox@master] Focus login button on entering Editmode

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

Change 511450 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] termbox: use latest

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

Change 511450 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] termbox: use latest

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

This is now on beta: https://wikidata.beta.wmflabs.org/w/index.php?title=Item:Q11&useformat=mobile
Despite being a subtask of T221831 I put it into product review as it was created / arrived there after the fact.

@Hanna_Petruschat_WMDE I don't remember any conscious decision in that regard.

Checking back with other UX peeps I'd suggest having the tab set to the element before the CTA so you would only be one keyboard hit away from focussing it but not distract users by visual differences which are not made use of anywhere elyse.

tl;dr

  • no instant focus
  • only one tab click away to focus the "Log in" button

Thanks!

Change 512927 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[wikibase/termbox@master] AnonEditWarning: focus before buttons

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

Change 512927 merged by jenkins-bot:
[wikibase/termbox@master] AnonEditWarning: focus before buttons

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

Tarrow subscribed.

Looks like all the patches for this are already merged and thus done