Last modified: 2014-09-18 13:11:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T17130, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15130 - Clicking text or links inside <label> attributes for checkboxes toggles associated checkbox
Clicking text or links inside <label> attributes for checkboxes toggles assoc...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/index.php?t...
: testme
: 18312 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-12 05:21 UTC by Charles Belov
Modified: 2014-09-18 13:11 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Charles Belov 2008-08-12 05:21:20 UTC
On edit screen is a checkbox for a minor edit.  The label tag for the minor edit checkbox is wrapped around not only the text "This is a minor edit" describing the checkbox but also around the help link "(What's this?)"

Including "(What's this?)" within the label tag causes the checkbox to be checked if one clicks the help link. If the person clicking the "(What's this?)" link fails to notice that the checkbox has been checked, they may unintentionally save the page as a minor edit when that was not their intention.

Workaround is to notice that the checkbox has become checked when that was not one's intention and to un-check it.

Suggested solution is to place the help link outside the link tag.  If it is important to associate the checkbox and the help link, they could be associated using a fieldset tag. 

Result is for Firefox 3 Mac browser, but I believe this can occur in other browsers as well.
Comment 1 Splarka 2008-08-12 06:13:32 UTC
This is a consequence of putting a link inside http://en.wikipedia.org/wiki/MediaWiki:Minoredit which is not the default:

 'minoredit'                        => 'This is a minor edit'

To solve this as you request, there would probably need to be two messages, and the first message not parsed for wikitext. To simply stop this happening the single wfMsg() call could simply not be parsed for wikitext, and then the "feature" of a link inside the label would be removed, in this instance (and probably this should be done for all checkbox labels).
Comment 2 Splarka 2008-08-12 23:55:03 UTC
Another place this occurs is in Special:Preferences, especially in the [Editing] tab on en.wp where several links have been inserted, and in the [Gadgets] tab (using the Gadgets extension).
Comment 3 Niklas Laxström 2008-09-28 08:02:45 UTC
It is hard to say who is in fault here 1) browsers checking the checkbox 2) users putting links where they were not intended to be (or taken into account when designing the messages) 3) us for not providing a mechanism to do it in a way that works.

Could someone check whether there is a bug open for that browser behaviour and whether it is correct?
Comment 4 Charles Belov 2008-09-29 07:05:12 UTC
It might not be the fault of browsers checking the checkbox. W3C guidelines for the label tag at http://www.w3.org/TR/html401/interact/forms.html#h-17.9 reads "When a LABEL element receives focus, it passes the focus on to its associated control." 
Comment 5 Splarka 2009-04-02 18:27:02 UTC
*** Bug 18312 has been marked as a duplicate of this bug. ***
Comment 6 Splarka 2009-04-02 18:29:22 UTC
Update summary to catch more dupes.
Comment 7 Luis Felipe Schenone 2013-05-13 22:16:07 UTC
I cannot reproduce this bug in Firefox 20, Chrome 26, Safari 6 or Opera 12. Can someone check with Internet Explorer?

Maybe since 2009, browsers realized of this problem and fixed it.
Comment 8 Andre Klapper 2014-07-18 12:06:15 UTC
Can anybody still reproduce this problem at all with modern browsers, five years later, or can this just be closed as obsolete?
Comment 9 Andre Klapper 2014-09-18 13:11:42 UTC
Cannot reproduce either. Closing as WORKSFORME nowadays.

Please reopen if you can still reproduce and provide browser information and a link where to reproduce. Thanks!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links