mirror of
https://github.com/thelounge/thelounge
synced 2024-11-21 19:43:07 +00:00
client: Indicate active context menu item for screen readers
This commit is contained in:
parent
3d33ef8083
commit
4ba16364cc
1 changed files with 2 additions and 0 deletions
|
@ -19,12 +19,14 @@
|
||||||
left: style.left + 'px',
|
left: style.left + 'px',
|
||||||
}"
|
}"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
|
:aria-activedescendant="activeItem > -1 ? `context-menu-item-${activeItem}` : undefined"
|
||||||
@mouseleave="activeItem = -1"
|
@mouseleave="activeItem = -1"
|
||||||
@keydown.enter.prevent="clickActiveItem"
|
@keydown.enter.prevent="clickActiveItem"
|
||||||
>
|
>
|
||||||
<!-- TODO: type -->
|
<!-- TODO: type -->
|
||||||
<template v-for="(item, id) of (items as any)" :key="item.name">
|
<template v-for="(item, id) of (items as any)" :key="item.name">
|
||||||
<li
|
<li
|
||||||
|
:id="`context-menu-item-${id}`"
|
||||||
:class="[
|
:class="[
|
||||||
'context-menu-' + item.type,
|
'context-menu-' + item.type,
|
||||||
item.class ? 'context-menu-' + item.class : null,
|
item.class ? 'context-menu-' + item.class : null,
|
||||||
|
|
Loading…
Reference in a new issue