Skip to content

fix(VMenu): avoid aria-owns for menu activators - #23060

Open
vianmangal wants to merge 2 commits into
vuetifyjs:masterfrom
vianmangal:fix/vmenu-safari-voiceover
Open

fix(VMenu): avoid aria-owns for menu activators#23060
vianmangal wants to merge 2 commits into
vuetifyjs:masterfrom
vianmangal:fix/vmenu-safari-voiceover

Conversation

@vianmangal

Copy link
Copy Markdown

Description

Fixes #22540.

VMenu activators now use aria-controls without also exposing aria-owns, which prevents Safari VoiceOver from dropping the accessible labels of menu items. Nested-overlay ownership tracking still works through a private data-v-overlay-activator attribute, preserving focus restoration for nested menus.

A browser regression test verifies that menu activators retain aria-controls and no longer receive aria-owns.

Validation:

  • pnpm --filter vuetify test:browser src/components/VMenu/__tests__/VMenu.spec.browser.tsx --run — 17 passed
  • Targeted ESLint for the three changed files — passed
  • pnpm --filter vuetify exec tsgo -p tsconfig.checks.json --noEmit --pretty — passed

Markup:

<template>
  <v-app>
    <v-container>
      <v-menu>
        <template #activator="{ props }">
          <v-btn v-bind="props">Open menu</v-btn>
        </template>

        <v-list>
          <v-list-item title="Click me" />
        </v-list>
      </v-menu>
    </v-container>
  </v-app>
</template>

Keep the accessible menu relationship through aria-controls without
exposing aria-owns, which causes Safari VoiceOver to drop item labels.
Preserve nested overlay ownership through an internal data attribute.

fixes vuetifyjs#22540
@vianmangal
vianmangal marked this pull request as ready for review August 2, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][3.11.7] Menu items in v-menu have no accessible labels with VoiceOver on Safari (probably aria-owns issue)

1 participant