Return focus to document on pressing Esc-key on chrome elements in tab order from the urlbar
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
People
(Reporter: manuel, Unassigned)
References
Details
(Keywords: blocked-ux, Whiteboard: [sng-scotchbonnet])
Edit 2024-12-05: The bug has shifted from being about dedicated search button to chrome elements. See comment 4 to comment 7
New steps to reproduce:
ctrl + l
to focus url bartab
to focus icon on the right of urlbaresc
to remove focus again
Expected result: Focus shifts back to document
Got result: Nothing happens
Original content of bug report, can be ignored:
Steps to reproduce:
ctrl + l
to focus url bar(Edit: necessary after Bug 1931765 to set focus to search button in step 3) enter some search terms (i.e. "asdf")shift + tab
to focus search buttonesc
to remove focus again
Got result: search button keeps being focused
Expected result: focus goes back to urlbar (same view as when pressing esc
directly after ctrl + l
)
Reporter | ||
Comment 1•3 months ago
|
||
Trying further: This behavior isn't unique. I can't remove the focus after pressing tab
to focus the next item (translation). So maybe not a bug specific to this button, but rather separate issue we either want to resolve or not. Probably boils down to the question: Is this design intentional/expected?
Comment hidden (obsolete) |
Reporter | ||
Comment 3•3 months ago
|
||
Just saw Bug 1086524. Similar bug, so probably wanted behavior to be able to remove focus with Esc from dedicated search button too. I wasn't aware that it was fixed so recently!
Comment 4•3 months ago
|
||
Anna, is there a recommendation that we should follow? Should we return focus to the address bar when ESC is pressed for any of the icons that are present in the address bar (e.g. Reader View, Security, Bookmarks, etc.)?
Comment 5•3 months ago
|
||
Anna and I discussed this. Stealing NI.
- Why do you think escape should return focus to the address bar? Can you explain the rationale here?
- In the majority of cases, escape dismisses a pop-up. From what I can tell, when you focus the unified search button, the address bar is always collapsed, so no pop-up is open and this doesn't apply.
- After bug 1086524, pressing escape on the address bar focuses the document. This is consistent with other browsers. I personally don't entirely follow the logic for this - yes, it's an input, but it's not a pop-up - but I guess it makes some sense if you think of the address bar as a modal with regard to how keyboard users interact with it.
- Pressing escape on toolbar buttons in other browsers does nothing.
- Given that there's no established convention here, having escape do something when focused on a toolbar button isn't going to hurt anyone. However, this would be an enhancement, not a defect.
- I don't think it makes sense for escape on any toolbar button to focus the address bar. For example, I can't logically explain why pressing escape on the Bookmark button should focus the address bar.
- Having escape focus the document would be consistent with (3).
Reporter | ||
Comment 6•3 months ago
•
|
||
(In reply to James Teh [:Jamie] from comment #5)
- Why do you think escape should return focus to the address bar? Can you explain the rationale here?
- In the majority of cases, escape dismisses a pop-up. From what I can tell, when you focus the unified search button, the address bar is always collapsed, so no pop-up is open and this doesn't apply.
The dedicated search button is part of the urlbar. When I enter text to search something and select a suggestion with Tab
, I can remove that selection by pressing Esc
. The dedicated search button is in the Tab
order of the search suggestion menu, therefore I expect I can remove the focus back to the urlbar when pressing Esc
if it had previously focus. Note that this seems to have been implemented now. (Not sure which patch/bug). Pressing Esc
on the dedicated search button returns focus to the urlbar.
- After bug 1086524, pressing escape on the address bar focuses the document. This is consistent with other browsers. I personally don't entirely follow the logic for this - yes, it's an input, but it's not a pop-up - but I guess it makes some sense if you think of the address bar as a modal with regard to how keyboard users interact with it.
I focus the Adress bar by pressing Ctrl + L
. Having some way (Esc
) to return back to the document somehow feels natural to me too.
- Pressing escape on toolbar buttons in other browsers does nothing.
I find that a bit inconsistent and I don't think we need to follow their example. I feel like this is not a design decision, but a current oversight in the UX for keyboard users that might get fixed by other browsers in the future too.
- Given that there's no established convention here, having escape do something when focused on a toolbar button isn't going to hurt anyone. However, this would be an enhancement, not a defect.
I agree.
- I don't think it makes sense for escape on any toolbar button to focus the address bar. For example, I can't logically explain why pressing escape on the Bookmark button should focus the address bar.
I agree. This Bug was initially for the dedicated search button. For other parts in the URL it probably makes sense to focus the document instead (e.g. from the search bar / back button, and maybe even other items within the urlbar.
- Having escape focus the document would be consistent with (3).
👍, haven't read that before writing (6). I fully agree.
Reporter | ||
Comment 7•3 months ago
|
||
Changing bug to be about other parts of the chrome, because the dedicated search button part has been fixed.
Reporter | ||
Comment 8•3 months ago
|
||
The part about pressing Esc
on the dedicated search button has been fixed in Bug 1933459.
Comment 9•2 months ago
|
||
(In reply to James Teh [:Jamie] from comment #5)
- After bug 1086524, pressing escape on the address bar focuses the document.
- Pressing escape on toolbar buttons in other browsers does nothing.
- Given that there's no established convention here, having escape do something when focused on a toolbar button isn't going to hurt anyone. However, this would be an enhancement, not a defect.
- I don't think it makes sense for escape on any toolbar button to focus the address bar.
- Having escape focus the document would be consistent with (3).
(In reply to Manuel Bucher [:manuel] from comment #6)
(In reply to James Teh [:Jamie] from comment #5)
PressingEsc
on the dedicated search button returns focus to the urlbar.
This indeed feels inconsistent with the other icons.
I agree. This Bug was initially for the dedicated search button. For other parts in the URL it probably makes sense to focus the document instead (e.g. from the search bar / back button, and maybe even other items within the urlbar.
This is something to evaluate, also related to James feedback about the matter.
Let's keep this as an enhancement, but it will need some UX input.
Updated•2 months ago
|
Description
•