UI: Add tooltips to Calendar and RangeCalendar navigation buttons - #81983
Conversation
|
Size Change: +151 B (0%) Total Size: 7.9 MB 📦 View Changed
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
That label comes from default DayPicker, I'll look into passing a shorter one |
|
Well, it actually was already a first-party label 😅 In any case, I've shortened it as requested. Thank you for the quick review! |
ef7721e to
c754587
Compare
|
I doubt we could rely only on 3rd party library strings anyway, since we need to get the strings into our (and consumers who bundle the UI library) translation pipelines. 🤔 |

What?
Add visible tooltips to the previous and next month buttons in the
CalendarandRangeCalendarcomponents.Why?
The icon-only navigation buttons have accessible labels, but sighted pointer and keyboard users cannot see those labels.
How?
Render the navigation controls with
IconButton, using the existing localized navigation labels for both the accessible name and tooltip text. Use the compact button size with IconButton's default 24px chevron, and rotate the complete button in RTL layouts while preserving disabled behavior.Testing Instructions
Design System/Components/Calendar/CalendarDefault story in Storybook.Design System/Components/Calendar/RangeCalendarDefault story.Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools
Codex was used to implement and test this change.