Double clicking label elements selects text form element




16 years ago
13 years ago


(Reporter: weeber51, Unassigned)



Firefox Tracking Flags

(Not tracked)



(1 attachment)



16 years ago
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 (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
Component: Selection → Accessibility APIs
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: pmac → dsirnapalli
Hardware: PC → All

Comment 2

16 years ago
Actually, I've rethought it a bit with some help from . The second to last 
paragraph states:

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

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.

Comment 3

16 years ago
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....

Comment 5

16 years ago
Created attachment 110299 [details]
Shows which clicks are fired between a label and input

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.

Comment 6

16 years ago
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

Comment 7

16 years ago
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

Comment 8

15 years ago
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


13 years ago
Last Resolved: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.