| 1 |
{{! |
| 2 |
Sticky header is hidden from screen readers because it contains duplicated content |
| 3 |
that is already accessible to assistive tech via landmark roles, element type, and other navigation methods. |
| 4 |
The interactive elements in the sticky header should have the `tabindex="-1"` attribute set to ensure |
| 5 |
the header is also not tab accessible. |
| 6 |
|
| 7 |
See https://dequeuniversity.com/rules/axe/4.1/aria-hidden-focus and https://phabricator.wikimedia.org/T290201 |
| 8 |
for more context. |
| 9 |
|
| 10 |
The exception to this is the TOC in the sticky header, which is not duplicated and is moved into the |
| 11 |
sticky header in the DOM. We apply `aria-hidden` to all the contents of the sticky header except for the TOC. |
| 12 |
}} |
| 13 |
<div id="vector-sticky-header" class="vector-sticky-header"> |
| 14 |
<div class="vector-sticky-header-start"> |
| 15 |
<div class="vector-sticky-header-icon-start vector-button-flush-left vector-button-flush-right" aria-hidden="true"> |
| 16 |
{{#data-button-start}} |
| 17 |
{{>Button}} |
| 18 |
{{/data-button-start}} |
| 19 |
</div> |
| 20 |
{{#data-search}} |
| 21 |
{{>SearchBox}} |
| 22 |
{{/data-search}} |
| 23 |
<div class="vector-sticky-header-context-bar"> |
| 24 |
{{#data-toc}} |
| 25 |
{{! TOC is moved into this dropdown from the sidebar in stickyHeader.js. }} |
| 26 |
<nav aria-label="{{ msg-vector-toc-label }}" class="vector-toc-landmark"> |
| 27 |
{{#data-sticky-header-toc-dropdown}} |
| 28 |
{{>Dropdown/Open}} |
| 29 |
{{#data-sticky-header-toc-pinnable-container}} |
| 30 |
{{>PinnableContainer/Unpinned/Open}} |
| 31 |
{{>PinnableContainer/Close}} |
| 32 |
{{/data-sticky-header-toc-pinnable-container}} |
| 33 |
{{>Dropdown/Close}} |
| 34 |
{{/data-sticky-header-toc-dropdown}} |
| 35 |
</nav> |
| 36 |
{{/data-toc}} |
| 37 |
<div class="vector-sticky-header-context-bar-primary" aria-hidden="true" {{{html-user-language-attributes}}}>{{{html-title}}}</div> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
<div class="vector-sticky-header-end" aria-hidden="true"> |
| 41 |
<div class="vector-sticky-header-icons"> |
| 42 |
{{#array-icon-buttons}} |
| 43 |
{{>Button}} |
| 44 |
{{/array-icon-buttons}} |
| 45 |
</div> |
| 46 |
<div class="vector-sticky-header-buttons"> |
| 47 |
{{#array-buttons}} |
| 48 |
{{>Button}} |
| 49 |
{{/array-buttons}} |
| 50 |
</div> |
| 51 |
<div class="vector-sticky-header-icon-end"> |
| 52 |
<div class="vector-user-links"> |
| 53 |
{{! User menu items with unique ids are cloned here from the fixed header in stickyHeader.js. }} |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
</div> |