In a Vue.js app with Vuetify, I have a set of password fields defined with a v-text-field
and which have an append-icon
in order to switch the text visibility, as follows:
<v-text-field
v-model="password"
:append-icon="show1 ? 'mdi-eye' : 'mdi-eye-off'"
:type="show1 ? 'text' : 'password'"
@click:append="show1 = !show1"
></v-text-field>
It is exactly similar to the documentation example for password input (See also the corresponding codepen).
With this set-up, if a user uses the Tab
key to navigate across the different fields (sequential keyboard navigation), the append-icon
s are included in the sequential keyboard navigation.
I would like to exclude these icons from this sequential keyboard navigation (and be able to jump from one password field to the other without navigating to the append-icon
).
Standard way to do that is to assign a "negative value (usually tabindex="-1"
)" which "means that the element is not reachable via sequential keyboard navigation", as explained here.
But I don't find how to assign a tab-index
value only to the append-icon
and not to the v-text-field
itself.