Last modified: 2012-09-29 20:18:50 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 T28133, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26133 - href="" is not OK for a dummy link
href="" is not OK for a dummy link
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/MediaWi...
:
Depends on:
Blocks: messages
  Show dependency treegraph
 
Reported: 2010-11-26 21:20 UTC by Christopher Yeleighton
Modified: 2012-09-29 20:18 UTC (History)
5 users (show)

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


Attachments

Description Christopher Yeleighton 2010-11-26 21:20:50 UTC
href="" means that you want to see the current index, and even then it is better to say href=".".

The message text should be:

Format broken links <a href="#" class="new">like this</a> (alternative: like this<a href="#" class="internal">?</a>)
Comment 1 Antoine "hashar" Musso (WMF) 2010-11-26 22:26:15 UTC
note: I am sure "#" will send you to the top of the document in some "old?" browsers.
Comment 2 p858snake 2010-11-26 22:39:11 UTC
Do we even need to have that message as a proper link? couldn't we just fudge it with some css?
Comment 3 Derk-Jan Hartman 2010-11-27 12:40:46 UTC
# will send you to the top (especially in Firefox for instance)
In the preferences this is a bit dangerous, especially in skins with non-tabbed preferences.

We could use the preferences JS, to hook the links and cancel their events of course....


@p858snake. Fudging it with CSS wouldn't be skin independent.
Comment 4 Christopher Yeleighton 2010-11-27 14:26:37 UTC
And why is sending to the top worse than sending to the index?

How about:

Format broken links <a id="org.wikimedia.MediaWiki.fakelink.1" href="#org.wikimedia.MediaWiki.fakelink.1" class="new">like this</a> (alternative: like
this <a id="org.wikimedia.MediaWiki.fakelink.2" href="#org.wikimedia.MediaWiki.fakelink.2" class="internal">?</a>)
Comment 5 Krinkle 2010-11-27 14:39:35 UTC
That will cause the page to akwardly scroll down untill that link is at the top of the window, which is not the expected behaviour.

If one wans't to make the link jump to itself use #mw-input-highlightbroken which is the nearest ID.

I suggest using href="#", which doesn't refresh/leave the page in any browser. In most modern browsers it does nothing, and in (some) Mozilla browsers it scrols back to the top (big deal).

To finish the deal onclick="return false;" ?
Comment 6 Christopher Yeleighton 2010-11-28 10:50:33 UTC
To finish the deal. disable the click event.

onclick is discouraged, and it is likely to be deprecated; handlers should be set within the JS UI controller framework.  Of couse, the exact code to use depends on the controller used.

Please do not take that remark as an insult; I am sure your recipe was meant to be pseudocode.
Comment 7 DieBuche 2011-04-21 14:26:08 UTC
Why not just <a class="new">like this</a>
Comment 8 Christopher Yeleighton 2011-05-29 15:21:11 UTC
Because that would not work in browsers that do not support CSS.

BTW, it should also say rel=nofollow.
Comment 9 db [inactive,noenotif] 2012-09-29 20:18:50 UTC
Preference 'highlightbroken' was removed

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


Navigation
Links