Closed Bug 507701 Opened 15 years ago Closed 14 years ago

wrapping <li> in <a> does not make entire <li> clickable (using html5 doctype)

Categories

(Core :: DOM: HTML Parser, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: runningtowardsnothing, Unassigned)

References

()

Details

(Whiteboard: [fixed by the HTML5 parser])

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1

According to the html5 spec, the <a> tag can wrap block-level elements. In Firefox 3.5.1, this works except for the <li> element. Instead, it treats it as if the <a> tag was inside the <li>, wrapping inline elements. 



Reproducible: Always

Steps to Reproduce:
1. Browse to test page: http://miketaylr.com/test/block_anchors.html
2. Hover over the first (green) list item.

Actual Results:  
Only the inline text within the list item is clickable/linked.

Expected Results:  
The entire block level list item should be clickable, just like the <div> at the top of the page.

All other modern browsers behave inline with the spec. In the latest Minefield nightly, the behavior is reproduced until you turn on the html5 parser.
Well, yes, this should be fixed with the HTML5 parser. Cf. bug 514122.
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → parser
Depends on: html5-parsing
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.