Closed Bug 253593 Opened 20 years ago Closed 20 years ago

Focus outlines look strange on image links

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 133165

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(2 files, 1 obsolete file)

Steps: 1. Load a document with an <img> surrounded by an <a> such as the attached test case 2. Tab to the image link 3. Notice that the focus outline is off This is the result of a focus outline being drawn both around the <a> and the <img>. However, the focus outline on the <a> is smaller and on the bottom half of the image.
Attached file Simple testcase showing the problem (obsolete) (deleted) —
The two overlapping style rules are: // From ua.css *|*:-moz-any-link:focus { -moz-outline: 1px dotted invert; } // From html.css *|*:-moz-any-link:focus img { -moz-outline: 1px dotted invert; } The first rule is displaying a focus outline in only the bottom half of the image. I think nsIFrame::GetOutlineRect() should be fixed to get the correct size, thus the second rule would no longer be necessary and could be removed.
Attached file Correct test case (deleted) —
Attachment #154684 - Attachment is obsolete: true
The generic version of this problem is "outlines spans with images decendants cover only bottom of image" This shows only the bottom of the element getting a red outline: .foo { -moz-outline: 3px solid red; } <span class="foo"><img src="http://www.mozilla.org/images/ico-moz-m.gif"></span>
border also has the same problem
Isn't this just a duplicate of bug 133165?
*** This bug has been marked as a duplicate of 133165 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
This is a recent regression. Sure, this may be caused by bug 133165, but the strange focus appearance has only shown up recently since bug 151375 was fixed. This makes it more important to fix bug 133165 soon.
Attached patch work in progress (deleted) — Splinter Review
Gotta sleep. But here's a patch that goes in the right direction. Seems to cause invalidation problems, when you tab around through certain pages, e.g. http://bugzilla.mozilla.org.
*** Bug 255760 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: