Commit b7071d2c37f6e6fd15e9e85fe6190d7895b31220

Authored by Aresn
Committed by GitHub
2 parents c15ea08c 711c6a32

Merge pull request #3007 from Xotic750/switch_tabindex

Switch: Add keyboard control
Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
src/components/switch/switch.vue
1 1 <template>
2   - <span :class="wrapClasses" @click="toggle">
  2 + <span
  3 + tabindex="0"
  4 + :class="wrapClasses"
  5 + @click="toggle"
  6 + @keydown.space="toggle"
  7 + >
3 8 <input type="hidden" :name="name" :value="currentValue">
4 9 <span :class="innerClasses">
5 10 <slot name="open" v-if="currentValue === trueValue"></slot>
... ...