Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh(a11y): Use button as header menu trigger #4481

Merged
merged 1 commit into from Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/components/NcHeaderMenu/NcHeaderMenu.vue
Expand Up @@ -68,18 +68,17 @@ export default {
v-click-outside="clickOutsideConfig"
:class="{ 'header-menu--opened': opened }"
class="header-menu">
<!-- Open trigger icon -->
<a ref="trigger"
class="header-menu__trigger"
href="#"
<!-- Trigger -->
<button ref="trigger"
class="header-menu__trigger button-vue"
:aria-label="ariaLabel"
:aria-controls="`header-menu-${id}`"
:aria-expanded="opened.toString()"
@click.prevent="toggleMenu">
<!-- @slot Icon trigger slot. Make sure the svg path
is at least 16px. Usually mdi icon works at 20px -->
<slot name="trigger" />
</a>
</button>

<!-- Visual triangle -->
<div v-show="opened" class="header-menu__carret" />
Expand Down Expand Up @@ -293,6 +292,8 @@ $externalMargin: 8px;
padding: 0;
cursor: pointer;
opacity: .85;
background-color: transparent;
border: none;

// header is filled with primary or image background
filter: none !important;
Expand Down