mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 03:34:25 +00:00
68239ae344
Changes: - mw-ui-button to cdx-button - mw-ui-quiet to cdx-button--weight-quiet - mw-ui-icon-element to cdx-button--icon-only - mw-ui-icon to vector-icon - mw-ui-icon-flush-right/left to vector-button-flush-right/left - Removes $isSmallIcon param in Hooks.php 85 Visual Changes - ~36 changes from minor pixel changes from the new button classes in the main menu, language button - 22 from standardizing the padding of the TOC in page title - ~10 changes from addition of .cdx-button to the TOC toggle buttons PERFORMANCE: This will result in an overall increase of 2.7kb of render blocking CSS, 1kb will be reclaimed when I6c1ed1523df8cc9e2f2ca09506f12a595b8b013d is merged. Co-author: Bernard Wang <bwang@wikimedia.org> Bug: T336526 Change-Id: Ibd558238a41a0d3edb981e441638f9564f43d226
58 lines
2.2 KiB
Plaintext
58 lines
2.2 KiB
Plaintext
{{!
|
|
Sticky header is hidden from screen readers because it contains duplicated content
|
|
that is already accessible to assistive tech via landmark roles, element type, and other navigation methods.
|
|
The interactive elements in the sticky header should have the `tabindex="-1"` attribute set to ensure
|
|
the header is also not tab accessible.
|
|
|
|
See https://dequeuniversity.com/rules/axe/4.1/aria-hidden-focus and https://phabricator.wikimedia.org/T290201
|
|
for more context.
|
|
|
|
The exception to this is the TOC in the sticky header, which is not duplicated and is moved into the
|
|
sticky header in the DOM. We apply `aria-hidden` to all the contents of the sticky header except for the TOC.
|
|
}}
|
|
<div id="vector-sticky-header" class="vector-sticky-header">
|
|
<div class="vector-sticky-header-start">
|
|
<div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true">
|
|
{{#data-button-start}}
|
|
{{>Button}}
|
|
{{/data-button-start}}
|
|
</div>
|
|
{{#data-search}}
|
|
{{>SearchBox}}
|
|
{{/data-search}}
|
|
<div class="vector-sticky-header-context-bar">
|
|
{{#data-toc}}
|
|
{{! TOC is moved into this dropdown from the sidebar in stickyHeader.js. }}
|
|
<nav role="navigation" aria-label="{{ msg-vector-toc-label }}" class="vector-toc-landmark">
|
|
{{#data-sticky-header-toc-dropdown}}
|
|
{{>Dropdown/Open}}
|
|
{{#data-sticky-header-toc-pinnable-container}}
|
|
{{>PinnableContainer/Unpinned/Open}}
|
|
{{>PinnableContainer/Close}}
|
|
{{/data-sticky-header-toc-pinnable-container}}
|
|
{{>Dropdown/Close}}
|
|
{{/data-sticky-header-toc-dropdown}}
|
|
</nav>
|
|
{{/data-toc}}
|
|
<div class="vector-sticky-header-context-bar-primary" aria-hidden="true" {{{html-user-language-attributes}}}>{{{html-title}}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="vector-sticky-header-end" aria-hidden="true">
|
|
<div class="vector-sticky-header-icons">
|
|
{{#array-icon-buttons}}
|
|
{{>Button}}
|
|
{{/array-icon-buttons}}
|
|
</div>
|
|
<div class="vector-sticky-header-buttons">
|
|
{{#array-buttons}}
|
|
{{>Button}}
|
|
{{/array-buttons}}
|
|
</div>
|
|
<div class="vector-sticky-header-icon-end">
|
|
<div class="vector-user-links">
|
|
{{! User menu items with unique ids are cloned here from the fixed header in stickyHeader.js. }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|