TimeZone: Do not show a tooltip that just repeats the visible text #56211
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
The TimeZone component uses a Tooltip to show an expansion of the UTC (Coordinated Universal Time) value.
There is a lot to say about using tooltips for descriptions, as the original goal of tooltips was to only show the accessible name of icon-only buttons. However, let's postpone this and just focus on the specific TimeZone implementation, for now.
It makes sense to expand the visible UTC when the additional information is actually an expansion. Screenshot:
However, it is not useful to show a tooltip when it just repeats the visible text. Screenshot:
The expansion text varies depending on the actual 'Timezone' setting in the admin, under Settings > General Settings > Timezone. When the value of the expansion is the same of the visible text, the component should not use Tooltip.
Worth also noting that now that the Tooltip component has been refactored using ariakit, it adds an
aria-describedby
to the element that uses the tooltip so that the element will have both the accessible name and the accessible description using the same text:Testing with Safari + VoiceOver, it appears they are smart enough to avoid a double announcement but I'm pretty sure other screen readers will announce both the name and the description, which is redundant and confusing.
Step-by-step reproduction instructions
EST
because I set it to New York.(EST) America/New York
.UTC+3
.UTC+3
.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: