Closed Bug 263034 Opened 20 years ago Closed 20 years ago

clicked anchor with location hash set to element id gives first child anchor focus rectangle

Categories

(Core :: XUL, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 258514

People

(Reporter: bfults, Assigned: jag+mozilla)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10

When you have an anchor that navigates to a hash which is an element's id, the
first child anchor (a[href]) of the element focused is given focus (and a focus
rectangle).

This is erroneous and misleading behavior because the element intended to be
given focus is the element with the id in the hash, not the child anchor. This
takes attention away from the element focused and gives focus to an element that
had no intention of being focused.

There are large accessibility concerns here because, as illustrated by the
testcase, the first child anchor is still given focus even if another accessible
element (e.g. a button, input box, etc.) is placed before the anchor inside the
focused container.

Instead of this undesirable behavior, the container with the id matched to the
location hash should receive focus, thus making the traversal of accessible
elements start with its first accessible child element (the first button in the
test case).

Reproducible: Always
Steps to Reproduce:
1. View the testcase
2. Click the anchor at the top
3. Notice that the anchor in the div is given a focus rectangle, although the
div itself was the one given focus.



Expected Results:  
To be clear: there should be no focus rectangle anywhere in the testcase after
the initial anchor is clicked. Pressing tab once should advance focus to the
button element, then twice to the second button, and three times would give
focus to the child anchor.
Attached file Initial testcase
This is the same as bug 258514. I agree with your suggestions of what Mozilla
should do in this case.

*** This bug has been marked as a duplicate of 258514 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: