diff --git a/front/src/components/ui/Popover.vue b/front/src/components/ui/Popover.vue index 81fac0981..2cb0196b5 100644 --- a/front/src/components/ui/Popover.vue +++ b/front/src/components/ui/Popover.vue @@ -6,6 +6,12 @@ import { isMobileView, useScreenSize } from '~/composables/screen' import { POPOVER_INJECTION_KEY, POPOVER_CONTEXT_INJECTION_KEY } from '~/injection-keys' import { type ColorProps, type DefaultProps, type RaisedProps, propsToColor } from '~/composables/colors'; +/* TODO: Basic accessibility + +-> See ui-docs + +*/ + const open = defineModel('open', { default: false }) const { positioning = 'vertical', ...colorProps } = defineProps<{ @@ -117,6 +123,7 @@ watch(open, (isOpen) => {
{ :style="position" :class="{ 'is-mobile': isMobile }" class="funkwhale popover" - v-bind="propsToColor(colorProps)" + v-bind="propsToColor(colorProps)" + style="display:flex; flex-direction:column;" >
diff --git a/front/src/components/ui/popover/PopoverItem.vue b/front/src/components/ui/popover/PopoverItem.vue index b31f9bf83..915aab8b0 100644 --- a/front/src/components/ui/popover/PopoverItem.vue +++ b/front/src/components/ui/popover/PopoverItem.vue @@ -1,5 +1,5 @@ @@ -45,6 +46,57 @@ const isOpen = ref(false) Popovers (`Popover`) are dropdown menus activated by a button. Use popovers to create dropdown menus ranging from simple lists to complex nested menus. +::: warning A11y issues + +This component has severe usability issues and cannot be used as-is. + +### Add keyboard operability + +> I can't operate the popup with a keyboard. Remove barrier for people not using a mouse. + +- ✅ All items can be focused and activated by `Space` + (use `