Remove the menu aria role from admin’s layout

Elements with the menu role require complex functionality and a keyboard
navigation[0] that i do not implement, thus the role is incorrect and
more harmful than anything else.

[0]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menu_role
This commit is contained in:
jordi fita mas 2023-08-15 20:52:14 +02:00
parent 98880d9173
commit 93364b896c
1 changed files with 8 additions and 8 deletions

View File

@ -24,12 +24,12 @@
<img src="/me/avatar" alt="{{( gettext "Avatar" )}}" width="70" height="70"> <img src="/me/avatar" alt="{{( gettext "Avatar" )}}" width="70" height="70">
<span>{{( pgettext "User Menu" "title" )}}</span> <span>{{( pgettext "User Menu" "title" )}}</span>
</summary> </summary>
<ul role="menu"> <ul>
<li role="presentation" class="icon_profile"> <li class="icon_profile">
<a role="menuitem" href="/me">{{( pgettext "Profile" "title" )}}</a> <a href="/me">{{( pgettext "Profile" "title" )}}</a>
</li> </li>
<li role="presentation" class="icon_logout"> <li class="icon_logout">
<button role="menuitem" data-hx-delete="/me/session" data-hx-headers='{ {{ CSRFHeader }} }' <button data-hx-delete="/me/session" data-hx-headers='{ {{ CSRFHeader }} }'
>{{( pgettext "Logout" "action" )}}</button> >{{( pgettext "Logout" "action" )}}</button>
</li> </li>
</ul> </ul>
@ -39,9 +39,9 @@
</header> </header>
{{ if isLoggedIn -}} {{ if isLoggedIn -}}
<nav> <nav>
<ul role="menu"> <ul>
<li role="presentation"> <li>
<a role="menuitem" href="/admin/">{{( pgettext "Dashboard" "title" )}}</a> <a href="/admin/">{{( pgettext "Dashboard" "title" )}}</a>
</li> </li>
</ul> </ul>
</nav> </nav>