Skip to content

Conversation

@JuliaKirschenheuter
Copy link
Contributor

@JuliaKirschenheuter JuliaKirschenheuter commented Nov 7, 2023

Replace NcDateTimePicker with NcDateTimePickerNative

Fixes nextcloud/server#40699

  • Create accessible labels for input fields
  • Fix other a11y issues (like closing a dropdown via Esc) via replacing components to NcDateTimePickerNative

Fixes nextcloud/server#40696

  • Add aria-label to "Delete slot"
  • Add aria-label to "Add slot"

🖼️ Screenshots

Before After
Screenshot from 2023-11-07 18-39-06 Screenshot from 2023-11-07 18-38-54

Copy link
Member

@Pytal Pytal left a comment

Choose a reason for hiding this comment

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

Other than translations

@ShGKme
Copy link
Contributor

ShGKme commented Nov 8, 2023

This library doesn't have any built-in l10n support at all.

It supposes a user to pass all localized strings as props (like l10nMonday).

Simple solution

Add new props aka l10nStartPickerLabel and pass translated strings from the server/calendar where the component is used. And the value should be not a translation, but a function. Aka

(dayName) => t('dav', 'Pick a start time for {dayName}', { dayName })

And then it can be used as

:label="l10nStartPickerLabel(day.displayName)"

Complex solution

Set up l10n for the library. Example: https://github.com/nextcloud-libraries/nextcloud-password-confirmation

Alternative solution

Move this component to the nextcloud/vue. To be honest, I don't see why it should be an individual package and repository.

@JuliaKirschenheuter JuliaKirschenheuter force-pushed the fix/40699-Availability_timepicker_improvements branch from 8c1ebec to 1f8e384 Compare November 8, 2023 13:46
Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

Tested and works. Thanks :)

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny force-pushed the fix/40699-Availability_timepicker_improvements branch from 1f8e384 to c5649e3 Compare November 8, 2023 16:24
@st3iny st3iny enabled auto-merge November 8, 2023 16:24
@st3iny st3iny merged commit 0e37151 into main Nov 8, 2023
@st3iny st3iny deleted the fix/40699-Availability_timepicker_improvements branch November 8, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BITV]: Availability timepicker improvements [BITV]: "Add slot" button have only title and must have aria-label too

6 participants