mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-14 18:05:01 +00:00
c5f38e466d
Changes: - added support of event-data-name to toggle list and all menu entries - track main menu open actions - prefix all menu interactions with `menu.` - prefix menu opening with `ui.` - track tab clicks (also a part of new ui) - track notification icon clicks We're not tracking the Download icon as it has it's own instrumentation. Bug: T220016 Change-Id: I442103c1f8967c6710429329f024f266c9b11ea6
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
{{!
|
|
A list with visibility toggled by a checkbox.
|
|
string|null class Optional CSS class for the root element.
|
|
string checkboxID CSS identifier unique to the page needed to connect label and input.
|
|
string|null toggleID Optional toggle button CSS identifier to connect label and toggle aria.
|
|
string|null toggleClass Optional toggle button CSS class.
|
|
string|null analyticsEventName Optional analytics event, sent element is clicked
|
|
string|null listClass Optional list CSS class.
|
|
string|null text Optional text and aria label for the toggle button.
|
|
array|null items Optional array of drop down list items for the unordered list.
|
|
}}
|
|
<div class="toggle-list {{class}}">
|
|
<input
|
|
type="checkbox"
|
|
id="{{checkboxID}}"
|
|
class="toggle-list__checkbox"
|
|
role="button"
|
|
aria-labelledby="{{toggleID}}"
|
|
aria-expanded="false">
|
|
<label
|
|
id="{{toggleID}}"
|
|
class="toggle-list__toggle {{toggleClass}}"
|
|
for="{{checkboxID}}"
|
|
data-event-name="{{analyticsEventName}}">
|
|
{{text}}
|
|
</label>
|
|
<ul class="toggle-list__list {{listClass}}">
|
|
{{#items}}
|
|
{{> ToggleList/ToggleListItem}}
|
|
{{/items}}
|
|
</ul>
|
|
</div>
|