Skip to content

Datetime widget a11y - #6808

Open
Wagner3UB wants to merge 9 commits into
mainfrom
datetime-widget-a11y-v18
Open

Datetime widget a11y#6808
Wagner3UB wants to merge 9 commits into
mainfrom
datetime-widget-a11y-v18

Conversation

@Wagner3UB

Copy link
Copy Markdown
Contributor

Improved accessibility for the ‘Datetime-Widget’ component by adding an ‘aria-label’ and a translation for the ‘screenReaderInputMessage’.

PR Volto 17: #6793

@Wagner3UB Wagner3UB self-assigned this Mar 4, 2025
@netlify

netlify Bot commented Mar 4, 2025

Copy link
Copy Markdown

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 79ffd95
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/67c70ddc6af1c40008862167

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A syntax change on the changelog, and a question about the message.

msgid "private"
msgstr ""

#. Default: "Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand. How do I "navigate forward"? Is that a mouse click, tap, or keyboard shortcut?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey @stevepiercy , I did not change the phrase, I just placed it inside our code to translate it into other languages. This message is read when we enter the date picker.
Screenshot 2025-03-04 alle 15 21 16

I can’t tell you what the logic behind it, it comes from the react-dates library: https://github.com/react-dates/react-dates/blob/master/src/defaultPhrases.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this the library we're using for a date picker? Sorry, I don't know.

See this line and its key.

https://github.com/react-dates/react-dates/blob/b7bad38dcff024d374ee98f972b55b3de9e61289/src/defaultPhrases.js#L26C7-L26C44

const keyboardForwardNavigationInstructions = 'Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';

We also have existing messages for what appears to be the same thing.

It has a backward counterpart in the next line.

Move backward to switch to the previous month.

Screenshot 2025-03-04 at 1 22 03 PM

I assume that navigation messages should be more descriptive and only for the icon. If so, then I'd use something like the following messages.

  • back: Tap or left arrow key to navigate backward in the calendar. On a selected date, tap or enter or return key to pick it.
  • forward: Tap or right arrow key to navigate forward in the calendar. On a selected date, tap or enter or return key to pick it.
  • info: Tap or question mark key to reveal keyboard shortcuts. Tap the close or "X" icon or the esc key to hide keyboard shortcuts.

I'm not sure whether we've adopted "tap", "press", or "click" for that gesture to satisfy both desktop and mobile UIs. Another thing for the accessibility guide! I'm also not sure whether we do anything to the names of keys to make them more accessible, such as in MyST I would do the following.

{kbd}`Return`

Comment thread packages/volto/news/6808.bugfix Outdated
Co-authored-by: Steve Piercy <web@stevepiercy.com>
@davisagli

Copy link
Copy Markdown
Member

Also needs an update to the unit test snapshots

@Wagner3UB
Wagner3UB changed the base branch from main to 18.x.x April 8, 2025 07:16
@Wagner3UB
Wagner3UB changed the base branch from 18.x.x to main April 8, 2025 07:19
@github-actions

Copy link
Copy Markdown

Hi There! 👋

We haven't seen any activity on this pull request in a while 😴, and we want to make sure that it's still relevant. Please let us know by:

  • adding a comment about what needs to be done next 💬
  • updating its status and other labels 🏷️

Otherwise close this pull request. 🧹

@github-actions github-actions Bot added the 27 status: stale An item that has not received updates in a long time label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

27 status: stale An item that has not received updates in a long time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants