This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 238339 - [validator] Incorrect warning when wrapping block level element with anchor tag in HTML5
Summary: [validator] Incorrect warning when wrapping block level element with anchor t...
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2013-11-14 02:46 UTC by zoszsoz
Modified: 2014-10-06 13:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description zoszsoz 2013-11-14 02:46:34 UTC
In HTML5 it is now completely valid syntax to wrap a block level element such as a "div" or "li" in an "a" (anchor) tag.

For example if I do this to make the whole "li" line clickable:

  <a "home.html">

In Netbeans it throws an error saying:

Element "a" not allowed as a child element of "ul" in this context.

This error is valid for HTML4 and XHTML doctypes, not HTML5 doctype. It is useful to make a whole element clickable without resorting to "cursor: pointer" and a JavaScript click event to accomplish the same thing.

Please remove this error if the HTML is in HTML5 doctype.

Thank you.
Comment 1 zoszsoz 2013-11-14 02:49:39 UTC
Supporting thread:
Comment 2 zoszsoz 2013-11-14 02:53:41 UTC
Regex Rule Category: Elements structure.
Comment 3 Vladimir Riha 2013-11-26 07:26:50 UTC

Product Version: NetBeans IDE Dev (Build 201311260002)