| 1 |
{{! |
| 2 |
See @typedef MenuDefinition |
| 3 |
}} |
| 4 |
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }} |
| 5 |
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }} |
| 6 |
<nav id="{{id}}" class="{{#class}}{{.}}{{/class}} vector-menu" aria-labelledby="{{id}}-label" {{{html-tooltip}}} {{{html-user-language-attributes}}}> |
| 7 |
{{#is-dropdown}} |
| 8 |
<input type="checkbox" |
| 9 |
id="{{id}}-checkbox" |
| 10 |
role="button" |
| 11 |
aria-haspopup="true" |
| 12 |
data-event-name="ui.dropdown-{{id}}" |
| 13 |
class="vector-menu-checkbox{{#checkbox-class}} {{.}}{{/checkbox-class}}" |
| 14 |
aria-labelledby="{{id}}-label" |
| 15 |
> |
| 16 |
<label |
| 17 |
id="{{id}}-label" |
| 18 |
{{#aria-label}} aria-label="{{.}}"{{/aria-label}} |
| 19 |
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}" |
| 20 |
> |
| 21 |
{{{html-vector-heading-icon}}}<span class="vector-menu-heading-label">{{label}}</span> |
| 22 |
</label> |
| 23 |
{{/is-dropdown}} |
| 24 |
{{^is-dropdown}} |
| 25 |
<h3 |
| 26 |
id="{{id}}-label" |
| 27 |
{{#aria-label}} aria-label="{{.}}"{{/aria-label}} |
| 28 |
class="vector-menu-heading{{#heading-class}} {{.}}{{/heading-class}}" |
| 29 |
> |
| 30 |
{{{html-vector-heading-icon}}}<span class="vector-menu-heading-label">{{label}}</span> |
| 31 |
</h3> |
| 32 |
{{/is-dropdown}} |
| 33 |
{{>MenuContents}} |
| 34 |
</nav> |