A hash-link must focus the anchor input
Categories
(Core :: DOM: Navigation, defect, P2)
Tracking
()
People
(Reporter: xaviermd, Unassigned)
References
Details
Attachments
(1 file, 1 obsolete file)
225 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0 Build ID: 20180815225731 Steps to reproduce: Clicked on a link that target an anchored <input> in the same page Actual results: <input> didn't get the focus Expected results: <input should have get the focus, for accessibilty reasons. Tested and failed on Firefox android 61 and 63. Tested and passed on Chrome.
Reporter | ||
Comment 1•6 years ago
|
||
You don't need the JS part for the moment, it's a future enhancement proposal ;)
Comment 2•6 years ago
|
||
I was able to reproduce this issue in the latest Nightly build. Build ID 20180822100104 User Agent Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0
Comment 3•6 years ago
|
||
Olli, do you know who might be able to triage this?
Comment 4•6 years ago
|
||
Just to clarify that this also doesn't work with a textarea.
Comment 5•6 years ago
|
||
So Chrome is inconsistent with label handling. We seem to be dealing with <a> elements only, and just move selection there https://searchfox.org/mozilla-central/rev/6ddb5fb144993fb5de044e2e8d900d7643b98a4d/layout/base/PresShell.cpp#3228
Updated•6 years ago
|
Comment 8•3 years ago
|
||
I raised bug 1707230 (https://bugzilla.mozilla.org/show_bug.cgi?id=1707230) which was closed as a duplicate of this one.
Whilst they do cover some of the same territory, I'm not 100% certain that they fully overlap.
The issue in 1707230 was that when focus moved to elements after following in-page links, the focus indication was absent on the targeted element. Focus is moved to the target element, but it's just not shown - even if more obvious focus styles are set on :focus in CSS.
You can demonstrate this using this test page https://research.coolfields.co.uk/browser-bugs/firefox-focus01.html - note that when you tab around the page, focus indication is clear on all elements. But when following in-page links, the focus is not shown. Note this text page features not just input fields as target elements, but links, headings and divs.
This is an accessibility issue as sighted keyboard-only users rely on clear focus indications to know where they are within a page.
Updated•2 years ago
|
Description
•