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 28700 - Labeled element should not match :hover or :active when the label's activation behavior is "do nothing"
Summary: Labeled element should not match :hover or :active when the label's activatio...
Status: RESOLVED MOVED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-26 15:11 UTC by Tooru Fujisawa
Modified: 2016-04-27 23:07 UTC (History)
4 users (show)

See Also:


Attachments
demo for labeled target with :hover and :active (380 bytes, text/html)
2015-05-26 15:11 UTC, Tooru Fujisawa
Details

Description Tooru Fujisawa 2015-05-26 15:11:50 UTC
Created attachment 1602 [details]
demo for labeled target with :hover and :active

Originally reported here:
  https://bugzilla.mozilla.org/show_bug.cgi?id=1167816
  https://bugzilla.mozilla.org/show_bug.cgi?id=1167862

In the attached demo, what the spec says is that hovering/clicking the "Click here" should change the checkbox's style (:hover and :active), but the checkbox shouldn't be checked/unchecked by clicking it.  This is confusing.

https://html.spec.whatwg.org/multipage/scripting.html#selector-active
> If the element is the labeled control of a label element that is currently matching :active
>   The element is being activated.

Labeled control should be activated only if the label's activation behavior is not "do nothing", since the element won't be actually activated on click.

https://html.spec.whatwg.org/multipage/scripting.html#selector-hover
> An element that is the labeled control of a label element that is currently
> matching :hover.

This should also be restricted to 'only if the activation behavior is not "do nothing"'.

> Consider in particular a fragment such as:
> 
> <p> <label for=c> <input id=a> </label> <span id=b> <input id=c> </span> </p>
> 
> If the user designates the element with ID "a" with their pointing device,
> then the p element (and all its ancestors not shown in the snippet above),
> the label element, the element with ID "a", and the element with ID "c" will
> match the :hover pseudo-class. The element with ID "a" matches it from
> condition 1, the label and p elements match it because of condition 2 (one of
> their descendants is designated), and the element with ID "c" matches it
> through condition 3 (its label element matches :hover). However, the element
> with ID "b" does not match :hover: its descendant is not designated, even
> though it matches :hover.

Here, ID "c" shouldn't match :hover.
Comment 1 Travis Leithead [MSFT] 2016-04-27 23:07:20 UTC
HTML5.1 Bugzilla Bug Triage: Moved to Github issue: https://github.com/w3c/html/issues/293

To file additional issues please use the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new Thanks!