Gerrit Patch Uploader has uploaded a new change for review.
https://gerrit.wikimedia.org/r/154453
Change subject: Use <div> instead of <a> for action menu
......................................................................
Use <div> instead of <a> for action menu
Bug: 42241
Bug: 66388
Change-Id: I7255552d3bdec9e40727721b91630623ae24a08b
---
M VectorTemplate.php
M components/tabs.less
M vector.js
3 files changed, 8 insertions(+), 11 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector
refs/changes/53/154453/1
diff --git a/VectorTemplate.php b/VectorTemplate.php
index 7d673f4..4e3d78e 100644
--- a/VectorTemplate.php
+++ b/VectorTemplate.php
@@ -490,7 +490,7 @@
?>" aria-labelledby="p-cactions-label">
<h3
id="p-cactions-label"><span><?php
$this->msg(
'vector-more-actions' )
- ?></span><a href="#"></a></h3>
+ ?></span><div></div></h3>
<div class="menu">
<ul<?php $this->html(
'userlangattributes' ) ?>>
diff --git a/components/tabs.less b/components/tabs.less
index 57fe45f..5e5adef 100644
--- a/components/tabs.less
+++ b/components/tabs.less
@@ -173,7 +173,7 @@
color: @menu-main-heading-color;
}
-div.vectorMenu h3 a {
+div.vectorMenu h3 div {
position: absolute;
top: 0;
right: 0;
@@ -185,11 +185,11 @@
.transition(background-position 250ms);
}
-div.vectorMenu.menuForceShow h3 a {
+div.vectorMenu.menuForceShow h3 div {
background-position: 100% 100%;
}
-div.vectorMenuFocus h3 a {
+div.vectorMenuFocus h3 div {
.background-image-svg('images/arrow-down-focus-icon.svg',
'images/arrow-down-focus-icon.png');
}
diff --git a/vector.js b/vector.js
index 7be3535..4e15a65 100644
--- a/vector.js
+++ b/vector.js
@@ -12,7 +12,7 @@
*/
$( 'div.vectorMenu' ).each( function () {
var $el = $( this );
- $el.find( '> h3 > a' ).parent()
+ $el.find( '> h3 > div' ).parent()
.attr( 'tabindex', '0' )
// For accessibility, show the menu when the h3 is
clicked (bug 24298/46486)
.on( 'click keypress', function ( e ) {
@@ -23,14 +23,11 @@
} )
// When the heading has focus, also set a class that
will change the arrow icon
.focus( function () {
- $el.find( '> a' ).addClass( 'vectorMenuFocus' );
+ $el.find( '> div' ).addClass( 'vectorMenuFocus'
);
} )
.blur( function () {
- $el.find( '> a' ).removeClass(
'vectorMenuFocus' );
- } )
- .find( '> a:first' )
- // As the h3 can already be focused there's no need for
the link to be focusable
- .attr( 'tabindex', '-1' );
+ $el.find( '> div' ).removeClass(
'vectorMenuFocus' );
+ } );
} );
/**
--
To view, visit https://gerrit.wikimedia.org/r/154453
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7255552d3bdec9e40727721b91630623ae24a08b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits