Vuetify 5.10 and Vue 2.6.14.
I know the Vuetify documentation says:
By default, v-menu components are detached and moved to the root of your application. In order to properly support inserting dynamic content into the DOM, you must use the attach prop. This will ensure that focus transfers from the activator to the content when pressing the tab key.
But they don't provide any example and I tried it and I couldn't make it work so I ended up not using it and just having a method that shows and hides my dropdown on click(it works but It sounds possible with v-menu).
Here is what I tried, this is not keyboard accessible:
<v-menu>
<template v-slot:activator="{ on, attrs }"> -->
<div v-bind="attrs" v-on="on" class="nearby-trigger">
<toggle-button
phrase="Location"
standalone
attach="#nearbyLocation"
></toggle-button>
</div>
</template>
<v-card id="nearbyLocation">
<v-container>
<v-row>
<v-col>
<v-text-field hide-details placeholder="Area Code"></v-text-field>
</v-col>
</v-row>
</v-container>
</v-card>
</v-menu>
Update: To give more explanation on the issue: The problem is that v-menu injects everything inside at the end of the DOM tree so let's say I have a header with my v-menu then main and then footer, well I can reach that menu via keyboard after the footer so I have to tab all the way through till after the footer. In conclusion, it appears in the right place but isn't in the right tab order(yes I've tried tabindex)
Thanks for any help!