Closed Bug 187038 Opened 22 years ago Closed 19 years ago

Double clicking label elements selects text form element

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: weeber51, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021226
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20021226

Double clicking on a label selects the text of the label as though the label was
not present. This does not affect focusing on the form element. I think double
clicking the label should not select the text but rather be interpreted as two
single clicks. After all, isn't double clicking on a label supposed to be
interpreted as something like: click on label -> click on form element, click on
label (very soon after) -> click on form element. If you click a label, click a
form element, click a label, click a form element very very quickly, you
wouldn't highlight the label text, so why should double clicking a label select
the label text?

Besides, I've noticed that a lot of inexperienced users double click items that
should be single clicked on (e.g., hypertext links). For these users, selecting
text after double clicking a label is not expected behavior. (Or is it? This may
be debatable.)

IE does not select label text on double clicking.

Reproducible: Always

Steps to Reproduce:
1.Goto www.hotmail.com (sorry, it's the only site I could think offhand that
uses labels)
2.Double click "Password"

Actual Results:  
"Password" becomes highlighted, input box receives focus.

Expected Results:  
Input box receives focus.
to aaronl.  Wouldn't it make more sense to treat a double click on the label as 
a double click on the input element involved?
Assignee: mjudge → aaronl
Status: UNCONFIRMED → NEW
Component: Selection → Accessibility APIs
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: pmac → dsirnapalli
Hardware: PC → All
Actually, I've rethought it a bit with some help from 
http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1 . The second to last 
paragraph states:

When a LABEL element receives focus, it passes the focus on to its associated 
control.

Sensibility aside, this suggests that the label shouldn't even invoke a click 
in the form element, much less a double click. I'm no expert on this though, so 
excuse me if I've misinterpreted.
what happens when i want to copy the text of the label?
Then you get screwed.  ;)

Though as Joe points out, a click on the label is just that -- a click on the 
label.  It focuses the form element, but the click event is fired on the 
_label_.  And in the doubleclick case, the doubleclick event is fired on the 
label as well.  And imo there is no reason <label> should react to a 
doubleclick event any differently from other elements....
Yes, following my rethink in comment 2, I have to agree with Boris in comment
4. Unlike current behavior, labels should not fire clicks for their form
elements, but since those clicks are not fired, a label should be able to fire
a double click. Who cares about those newbies who click too much, a highlight
won't hurt 'em ;)

An attachment with some script to show when a label and its input fire clicks.
Ick, I don't want this. I might want to be selecting a word in the label. This
idea is counterintuitive to me.

Maybe our standards guru can tell us whether to mark it WONTFIX or not.
Assignee: aaronl → ian
Sorry, I should have been more clear. I think labels should be selectable just 
like other text with double clicks, but they shouldn't fire onclicks for their 
respective form elements (only focus).
Assignee: ian → aaronleventhal
QA Contact: dsirnapalli → core.accessibility-apis
I think the current behavior is smart and does exactly the right thing, and it
does what I would expect -- both focus the control and select the current word.

This certainly isn't an accessibility issue that I can see. Personally, I think
this is WONTFIX.
Assignee: aaronleventhal → nobody
Component: Accessibility APIs → Layout: Form Controls
QA Contact: core.accessibility-apis → core.layout.form-controls
dup to bug 163912 seems reasonable?
(seems like these should be resolved or wontfixed - who makes the call?)
Severity: trivial → minor
Summary: Double clicking label elements selects text → Double clicking label elements selects text form element
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: