diff --git a/i18n/en.json b/i18n/en.json
index 73e81075..d807b11f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -42,7 +42,8 @@
"vector-anon-user-menu-pages": "Pages for logged out editors",
"vector-anon-user-menu-pages-learn": "learn more",
"vector-anon-user-menu-pages-label": "Learn more about editing",
- "vector-personal-more-label": "User links",
"vector-main-menu-tooltip": "Main menu",
+ "vector-article-tools-nav-label": "Article tools",
+ "vector-site-nav-label": "Site",
"tooltip-vector-anon-user-menu-title": "More options"
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1bc86d0c..9de1e61c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -57,7 +57,8 @@
"vector-anon-user-menu-pages": "Label describing the anon editor links in the anon user menu",
"vector-anon-user-menu-pages-learn": "Lowercase text of link that goes to Help:Introduction and helps the user learn more about editing",
"vector-anon-user-menu-pages-label": "Accessible version of 'vector-anon-user-menu-pages' link text, prompts user to learn more about editing",
- "vector-personal-more-label": "Label describing the user links next to the user links dropdown menu.",
"vector-main-menu-tooltip": "Used as title attribute for main menu icon on hover.",
+ "vector-article-tools-nav-label": "Accessible label for the article tools nav landmark",
+ "vector-site-nav-label": "Accessible label for site (main menu) nav landmark",
"tooltip-vector-anon-user-menu-title": "Used as title attribute for user menu icon on hover for anonymous users."
}
diff --git a/includes/SkinVector.php b/includes/SkinVector.php
index 4a8b9d8e..f82c7b24 100644
--- a/includes/SkinVector.php
+++ b/includes/SkinVector.php
@@ -346,13 +346,11 @@ abstract class SkinVector extends SkinMustache {
'data-user-page' => $menuData[ 'data-user-page' ],
'html-vector-watchlist' => $this->getWatchlistHTML( $menuData[ 'data-vector-user-menu-overflow' ] ?? null ),
] );
- $userMoreData = [
+ $userMoreData = $this->decoratePortletData( 'data-user-more', [
'id' => 'p-personal-more',
- 'class' => 'mw-portlet mw-portlet-personal-more vector-menu vector-user-menu-more',
+ 'class' => 'mw-portlet mw-portlet-personal-more vector-user-menu-more',
'html-items' => $userMoreHtmlItems,
- 'label' => $this->msg( 'vector-personal-more-label' ),
- 'is-dropdown' => false,
- ];
+ ] );
$userMenuData = $menuData[ 'data-user-menu' ];
if ( $isAnon ) {
@@ -857,6 +855,7 @@ abstract class SkinVector extends SkinMustache {
case 'data-notifications':
case 'data-personal':
case 'data-user-page':
+ case 'data-user-more':
$type = self::MENU_TYPE_DEFAULT;
break;
case 'data-languages':
@@ -902,6 +901,8 @@ abstract class SkinVector extends SkinMustache {
return $portletData + [
'is-dropdown' => $type === self::MENU_TYPE_DROPDOWN,
+ // In modern vector only dropdown and portal menus render a label element
+ 'has-label' => $this->isLegacy() || $type === self::MENU_TYPE_DROPDOWN || $type === self::MENU_TYPE_PORTAL,
];
}
}
diff --git a/includes/templates/Menu.mustache b/includes/templates/Menu.mustache
index 00b926b2..a5b8b23c 100644
--- a/includes/templates/Menu.mustache
+++ b/includes/templates/Menu.mustache
@@ -1,23 +1,30 @@
{{!
See @typedef MenuDefinition
}}
-{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
-
diff --git a/includes/templates/UserLinks.mustache b/includes/templates/UserLinks.mustache
index c6fc8b2b..8ac66a67 100644
--- a/includes/templates/UserLinks.mustache
+++ b/includes/templates/UserLinks.mustache
@@ -1,4 +1,4 @@
-
+
diff --git a/includes/templates/legacy/Menu.mustache b/includes/templates/legacy/Menu.mustache
new file mode 100644
index 00000000..4b699107
--- /dev/null
+++ b/includes/templates/legacy/Menu.mustache
@@ -0,0 +1,29 @@
+{{!
+ See @typedef MenuDefinition
+}}
+{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
+
+
+ {{#is-dropdown}}
+
+ {{/is-dropdown}}
+
+ {{{html-vector-heading-icon}}}{{label}}
+
+