primevue icon indicating copy to clipboard operation
primevue copied to clipboard

Menubar: Aria label not set to item label

Open lisuzanne94 opened this issue 9 months ago • 0 comments

Describe the bug

The aria-labels for the menubar items should be set to the item's label. Instead, they are all being set to aria-label="1".

<script setup>
import Menubar from 'primevue/menubar'
import { ref } from 'vue'

const items = ref([
    {
      label: 'label-one',
      items: [
        {
          label: 'sub-one',
        }
      ]
    },
    {
      label: 'label-two',
      items: [
        {
          label: 'sub-two-one',
        },
        {
          label: 'sub-two-two',
        },
        {
          label: 'sub-two-three',
          items: [
            {
              label: 'sub-sub-two-one',
            },
            {
              label: 'sub-sub-two-two',
            },
          ]
        }
      ]
    },
    {
      label: 'label-three',
      items: [
        {
          label: 'sub-three',
        }
      ]
    },
    ])
</script>

<template>
  <Menubar :model="items" />
</template>

<style scoped>
</style>

Screenshot 2024-05-10 at 1 10 44 PM

Reproducer

Wasn't able to reproduce in sandbox

PrimeVue version

^3.52.0

Vue version

3.x

Language

ES6

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

The menubar li elements should have aria-label="label-one", aria-label="label-two", etc. But they all have aria-label="1" instead.

lisuzanne94 avatar May 10 '24 17:05 lisuzanne94