[Bug 28700] New: Labeled element should not match :hover or :active when the label's activation behavior is "do nothing"

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28700

            Bug ID: 28700
           Summary: Labeled element should not match :hover or :active
                    when the label's activation behavior is "do nothing"
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: arai.unmht@gmail.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

Created attachment 1602
  --> https://www.w3.org/Bugs/Public/attachment.cgi?id=1602&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 26 May 2015 15:11:52 UTC