Skip to content

feat(VTimePicker): Add keyboard controls#22604

Open
ikushum wants to merge 6 commits intodevfrom
fix/time-picker-accessibility-improvement
Open

feat(VTimePicker): Add keyboard controls#22604
ikushum wants to merge 6 commits intodevfrom
fix/time-picker-accessibility-improvement

Conversation

@ikushum
Copy link
Copy Markdown
Member

@ikushum ikushum commented Feb 7, 2026

fixes #10722, #21885

Description

  • Convert the hour, second and minute divs to buttons
  • Add keyboard controls and navigation

Markup:

<template>
  <v-container>
    <v-time-picker
      v-model="model"
      use-seconds
    />
  </v-container>
</template>

<script setup>
  import { ref } from 'vue'

  const model = ref()
</script>

@ikushum ikushum self-assigned this Feb 7, 2026
@J-Sek
Copy link
Copy Markdown
Contributor

J-Sek commented Feb 8, 2026

The immediate problem becomes - assistive tools will show the clock has 12 options for minutes and seconds with gaps. Not sure if VBtn approach is correct here. Maybe the clock should have role spinbutton and accept up/down keys to change, while the visual representation is more of a guide for people relying on pointer-based interaction.

@ikushum ikushum force-pushed the fix/time-picker-accessibility-improvement branch from 6d568d8 to 667b82d Compare February 9, 2026 04:31
@ikushum ikushum marked this pull request as ready for review February 9, 2026 04:51
@ikushum ikushum requested a review from a team February 9, 2026 04:51
.v-time-picker-clock__item--disabled
opacity: var(--v-disabled-opacity)
&:focus-visible
outline: none
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outline would definitely help convey the clock is focused. Background color difference is barely visible.


return (
<div
<VBtn
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing projects might have some customization on .v-btn that could unintentionally leak here. Since the styles would need to be slightly reworked for v4, maybe we should push it all to next?

@J-Sek
Copy link
Copy Markdown
Contributor

J-Sek commented Feb 26, 2026

The claim "because tests look ugly" is too weak to justify the risk unintentional styling accidents. E.g. user can make all VBtn have strong shadow and even supplement custom CSS, just to later realize it leaks into this component.

Everything else looks good and we could merge without VBtn.

@J-Sek J-Sek force-pushed the dev branch 2 times, most recently from 5b257fd to 86800d9 Compare March 29, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants