Use <a> instead of <a href="#"> for JavaScript click events
* No status line with URL and "#". * No new tab on middle click. tabindex="0" ensures to have the normal tab order. role="button" according to https://www.mediawiki.org/wiki/Accessibility_guide_for_developers Change-Id: I82f1923b3905f111ce7719c03a3919633271720a
This commit is contained in:
@@ -382,10 +382,15 @@
|
||||
|
||||
// Bind language settings to preferences page link
|
||||
$( '#uls-preferences-link' )
|
||||
.click( function () {
|
||||
$ulsTrigger.trigger( 'click', {
|
||||
source: 'preferences'
|
||||
} );
|
||||
.on( 'click keypress', function ( e ) {
|
||||
if (
|
||||
e.type === 'click' ||
|
||||
e.type === 'keypress' && e.which === 13
|
||||
) {
|
||||
$ulsTrigger.trigger( 'click', {
|
||||
source: 'preferences'
|
||||
} );
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user