Page MenuHomePhabricator

In Phabricator forms, text fields made visible by an option should become focused when they appear
Closed, DeclinedPublicFeature

Description

E.g. enter an existing task page, go to the comment form, select "Add CCs" in the Action dropdown. The appearing "CCs" field should get focused.

Event Timeline

Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added projects: Phabricator, Design-Research.
Tgr changed Security from none to None.
Tgr subscribed.

(On an unrelated note, shouldn't #usability resolve to Design instead of WMF-Design-Research?)

Qgil triaged this task as Lowest priority.Dec 11 2014, 11:48 AM
Qgil edited projects, added Phabricator (Upstream); removed Design-Research, Phabricator.
Qgil added subscribers: Jaredzimmerman-WMF, Qgil.
In T78196#839137, @Tgr wrote:

(On an unrelated note, shouldn't #usability resolve to Design instead of WMF-Design-Research?)

@Jaredzimmerman-WMF can do something about it. I can't edit it.

I think it actually makes sense as is, from an accessibility perspective, a user might want to continue making changing to the control that has focus (cycling through the options) To me that would be the expected behavior, with a tab being used for navigating between fields, like in other form field arrays.

I'm recommending declining

I cannot remember exactly where, but I remember a comment from Evan (Phabricator maintainers) declining a similar "guess the focus for me" request with a reply that came to say that they don't want to make these kind of assumptions.

After CCing a lot of people, I haven't been missing this feature at all...

epriestley subscribed.

I think there are at least a few different flows here:

In one flow, you want to take exactly one action (like "Add CCs"), so focusing the input would help.

In another flow, you want to take several actions ("Add CCs", "Change Priority"), but want to input them one at a time (select "Add CCs", type CCs, select "Change Priority", select priority), so focusing the input would help.

In another flow, you want to take several actions ("Add CCs", "Change Priority"), but want to input all the actions first, then configure them (select "Add CCs", select "Change Priority", then type CCs, then select priority). Depending on how you're inputting things, focusing the input could be distracting or harmful in this flow. It's probably mildly distracting if you're using a mouse, somewhat annoying if you're using the keyboard, and perhaps fairly confusing if you're using a screenreader. At least personally, I do this (pick all my actions first, then configure them) pretty frequently.

I'm generally hesitant about adding focus magic / weird nonstandard client behavior to forms, particularly in cases where the focus behavior is not always preferable, and I think it would make some (admittedly, less common) workflows at least somewhat worse.

Personally, as a user, I want forms and controls to look and behave like they do in my OS/browser unless there's some obvious compelling reason for their behavior to deviate and I think following this principle tends to make the software more usable, especially for users with accessibility concerns.

Obviously, a lot of this is subjective and plenty of other software makes different decisions so clearly some users and developers want more UI magic and feel like this makes workflows more efficient, but I believe plenty of users are also happier with lower-magic interfaces.

In any case, I currently think it's unlikely that we'll add additional focus behavior to this interface. We're unlikely to add this kind of focus behavior in cases where the behavior could sometimes be undesirable/incorrect, even if those cases are rare.

I think since this was filed, we also added the inline @-autosuggester, which might mitigate this somewhat -- you can CC users with autosuggestion by just typing @ and their name directly in the comments, now.

This is something we can consider implementing in our fork and maintaining downstream if there is enough interest. I am of the opinion that it'd be helpful. Another option might be to do it with a browser extension or userscript.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Oct 28 2023, 2:10 PM

Boldly declining this for now, given Evan's last comment - there's conflicting "add a value for this action" vs "add another action" when it comes to auto-focusing, and I'd prefer not maintaining a downstream patch for this. (Though arrow-down seems to be broken, but that's a different topic.)