Open Bug 1484185 Opened 6 years ago Updated 2 years ago

A hash-link must focus the anchor input

Categories

(Core :: DOM: Navigation, defect, P2)

63 Branch
defect

Tracking

()

People

(Reporter: xaviermd, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached file test-focus-on-label.html (obsolete) —
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.
You don't need the JS part for the moment, it's a future enhancement proposal ;)
Attachment #9001936 - Attachment is obsolete: true
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
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Product: Firefox → Core
Olli, do you know who might be able to triage this?
Flags: needinfo?(bugs)
Priority: -- → P2
Just to clarify that this also doesn't work with a textarea.
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
Flags: needinfo?(bugs)
Component: DOM: Events → Document Navigation

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.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: