Closed Bug 158043 Opened 23 years ago Closed 22 years ago

<label> should have pointer cursor

Categories

(Core :: Layout: Form Controls, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.2beta

People

(Reporter: jruderman, Assigned: dbaron)

References

()

Details

(Keywords: helpwanted, regression, Whiteboard: [patch])

Attachments

(1 file)

<label>s should have a pointer cursor so the user has some hint that clicking the label does something. The UI was discussed in bug 49902. I think this is a regression, which might have happened at the same time bug 103409 was fixed. Examples: - Checkboxes on http://www.cs.hmc.edu/~jruderma/s/. - The text "Search the Web" at http://www.msn.com/.
0.9.9 uses a pointer cursor.
Keywords: regression
patches accepted
Keywords: helpwanted
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Future
Any reason this couldn't be solved by just adding... label { cursor: default; } ...to html.css? I'd also suggest adding: label:active { -moz-outline: 1px dotted invert; } ...which would give users more visual feedback that they've clicked on the label. It would also be nice if it outlined the label when the form element associated with it was active, but that's a seperate issue reported in bug 142898.
I tried the same in forms.css (which seemed a more appropriate place) and it worked fine; I just got bogged down trying to install Gerv's patch maker. It looks like this got missed when the fix for bug 96813 got checked in. From dbaron's commit comments: "Move implementation of HTML label element entirely into the content model so that it can have any display type". Part of the commit removed the last remaining style rules on label elements: http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=forms.css&root=/cvsroot&subdir=mozilla/layout/html/document/src&command=DIFF_FRAMESET&rev1=3.42&rev2=3.43
Taking bug. The suggested change seems reasonable to me, although it is somewhat disturbing to be able to select text with a non-I-beam cursor.
Assignee: rods → dbaron
Status: ASSIGNED → NEW
Target Milestone: Future → mozilla1.2beta
Comment on attachment 98736 [details] [diff] [review] patch r=jkeiser Though is there a reason not to also do Tom's suggestion for label:active? It seems like it would help out visually.
Attachment #98736 - Flags: review+
I commented on bug 142898 about label:active -- such a rule wouldn't work correctly now if the label has child elements -- so I made bug 142898 depend on the bug about fixing :active, (although we could hack label elements the same way a elements are hacked, that would probably be bad). I'd rather deal with that separately from the regression from 96813.
Comment on attachment 98736 [details] [diff] [review] patch sr=bzbarsky... Though I agree that the selection issue is weird... Do we have a good way of switching the cursor to i-beam when the user starts dragging in the label?
Attachment #98736 - Flags: superreview+
Using this would make the cursor an i-beam on select (not sure if I'm in favour of this happening, though): label { cursor: default; } label:active { cursor: auto; } ...however, I'm just wondering if this may cause some issues if the element or a parent element had been made unselectable?
OS: Windows 2000 → All
Hardware: PC → All
Fix checked in to trunk, 2002-09-16 07:15 PDT.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: