This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24473 - Non-link <a> elements should not be an interactive content
Summary: Non-link <a> elements should not be an interactive content
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-03 00:01 UTC by Kent Tamura
Modified: 2014-02-03 14:05 UTC (History)
2 users (show)

See Also:


Attachments

Description Kent Tamura 2014-02-03 00:01:32 UTC
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#interactive-content-0

The current specification:
> Interactive content is content that is specifically intended for user interaction.
> a, audio (if the controls attribute is present), button, details, embed, iframe,
> img (if the usemap attribute is present), input (if the type attribute is not
> in the hidden state), keygen, label, object (if the usemap attribute is
> present), select, textarea, video (if the controls attribute is present)

Proposal:
'a,' -> 'a (if href attribute is present),'

Reason:
<a> without href attribute is not interactive.

Google Chrome 32 follows the specification and click on interactive elements in <label> doesn't activate the labeled element. The behavior for <label><a>...</a>...</label> was reported as a bug.  https://code.google.com/p/chromium/issues/detail?id=339629
Comment 1 Simon Pieters 2014-02-03 13:55:04 UTC
"Interactive content" in the spec is just about content models, i.e. conformance for authors. It doesn't say anything about behavior for UAs.

That is, <a><a></a></a> is not allowed in the content model.

For UA requirements, the spec says

"The activation behavior of a elements that create hyperlinks is to run the following steps: ..."
http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-a-element

a without href doesn't create a hyperlink, so doesn't have an activation behavior defined, so the "run synthetic click activation steps" do not apply.
Comment 2 Kent Tamura 2014-02-03 14:05:08 UTC
Ah, Simon is right. I overlooked "The activation behavior of a label element for" in [1].


[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-label-element
> The activation behavior of a label element for events targeted at interactive content descendants of a label element, and any descendants of those interactive content descendants, must be to do nothing.