mediawiki-skins-Vector/includes/templates/LegacyMenu.mustache
Jon Robson 3dbadabdfe Document the importance of vector-menu class
It's used by click tracking so marking with inline comment that
we need to be careful if we plan to remove it in our current
refactoring.

Change-Id: I6aee01363d2d150844e61fb27ab584c8ee78c4ae
2023-01-03 14:45:40 -08:00

35 lines
1.2 KiB
Plaintext

{{!
See @typedef MenuDefinition
}}
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }}
<nav id="{{id}}" class="vector-menu{{#class}} {{.}}{{/class}}" aria-labelledby="{{id}}-label" role="navigation" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
{{#is-dropdown}}
<input type="checkbox"
id="{{id}}-checkbox"
role="button"
aria-haspopup="true"
data-event-name="ui.dropdown-{{id}}"
class="vector-menu-checkbox{{#checkbox-class}} {{.}}{{/checkbox-class}}"
aria-labelledby="{{id}}-label"
/>
<label
id="{{id}}-label"
{{#aria-label}} aria-label="{{.}}"{{/aria-label}}
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}"
>
{{{html-vector-heading-icon}}}<span class="vector-menu-heading-label">{{label}}</span>
</label>
{{/is-dropdown}}
{{^is-dropdown}}
<h3
id="{{id}}-label"
{{#aria-label}} aria-label="{{.}}"{{/aria-label}}
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}"
>
{{{html-vector-heading-icon}}}<span class="vector-menu-heading-label">{{label}}</span>
</h3>
{{/is-dropdown}}
{{>MenuContents}}
</nav>