Skip to content

TimePicker: Show the time zone detail in an infotip - #86806

Draft
mirka wants to merge 6 commits into
trunkfrom
timepicker-time-zone-infotip
Draft

mirka wants to merge 6 commits into
trunkfrom
timepicker-time-zone-infotip

Conversation

@mirka

@mirka mirka commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

What?

Replaces the tooltip that shows the full site time zone in TimePicker with an infotip: the time zone abbreviation becomes a button that opens a @wordpress/ui Popover on hover, click, tap, or Enter.

Why?

The tooltip was attached to a <div> that cannot receive focus, so only mouse users could read the full time zone. The @wordpress/ui usage guidelines recommend a popover for this kind of supplementary information, so that keyboard, touch, and screen reader users can reach it.

This is also one of the changes that move @wordpress/components internals off its own tooltip, which portals to body with a fixed z-index and so appears behind @wordpress/ui overlays. The popover renders in the compat overlay slot, where it stacks above both.

How?

The abbreviation itself is the trigger, rather than a separate help icon as in the infotip guidelines, because its dotted underline already signals that there is more to read and the time row has no room for another control. Its accessible name, "Timezone: AST", gives the abbreviation context for screen reader users, and the popover keeps its default hover delays rather than the old tooltip's timing.

Testing Instructions

  1. In Settings > General, set the timezone to a city whose offset differs from your computer's, such as Port of Spain.
  2. Open a post and open the publish date picker in the post sidebar.
  3. Hover the time zone abbreviation next to the time. A popover shows the full time zone, such as "(AST) America/Port of Spain", above the abbreviation.
  4. Move the pointer onto the popover. It stays open.
  5. Click the abbreviation. The popover opens. Press Escape. The popover closes and the date picker stays open.
  6. Set the timezone to a UTC offset, such as UTC+3. The abbreviation shows as plain text with no popover.
  7. On a touch device, or with touch emulation, tap the abbreviation. The popover opens.

Testing Instructions for Keyboard

  1. In the date picker from the steps above, press Tab until the time zone abbreviation has a focus ring.
  2. Press Enter. The popover opens and focus moves into it.
  3. Press Escape. The popover closes, focus returns to the abbreviation, and the date picker stays open.

Screenshots or screencast

Before After
Hover The time zone abbreviation with a dark tooltip above it reading (AST) America/Port of Spain The time zone abbreviation with a light popover above it reading (AST) America/Port of Spain
Keyboard focus The time zone abbreviation, which cannot receive focus The time zone abbreviation with a focus ring
Inside a @wordpress/ui Dialog A dialog containing the time picker, with the time zone tooltip hidden behind the dialog except for its last few characters A dialog containing the time picker, with the time zone popover shown above the dialog

The time zone detail was in a tooltip on a non-focusable element, so only
mouse users could reach it. Make the abbreviation a popover trigger from
@wordpress/ui that opens on hover or activation, so keyboard, touch, and
screen reader users can reach it too. The popover portals into the compat
overlay slot, so it also shows above @wordpress/ui overlays.
@mirka mirka added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Nov 13, 2026
@mirka mirka self-assigned this Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

📦 Bundle size

Size Change: +6.59 kB (+0.08%)

Total Size: 8.69 MB

📦 View Changed
Filename Size Change
build/scripts/components/index.min.js 352 kB +6.59 kB (+1.91%)

1da1c9d Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric f0c447d trunk % Change
timeToFirstByte 44.5 ms +4.16% -4.94% 43.55 ms +3.44% -5.74% 2.18%
largestContentfulPaint 72 ms +5.56% -5.56% 68 ms +5.88% -5.88% 5.88%
lcpMinusTtfb 25.1 ms +27.29% -8.37% 24.25 ms +8.87% -5.98% 3.51%
wpBeforeTemplate 22.46 ms +5.97% -3.29% 22.34 ms +5.68% -3.45% 0.54%
wpTemplate 17.55 ms +4.22% -3.3% 16.77 ms +7.57% -5.49% 4.65%
wpTotal 40.96 ms +4.76% -4.54% 39.86 ms +4.06% -5.85% 2.76%
wpMemoryUsage 7.75 MB +0% -0% 7.71 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric f0c447d trunk % Change
timeToFirstByte 35.7 ms +3.92% -1.26% 35.35 ms +4.24% -2.69% 0.99%
largestContentfulPaint 64 ms +3.13% -0% 64 ms +0% -3.13% 0%
lcpMinusTtfb 28.5 ms +3.86% -1.23% 27.65 ms +6.33% -3.44% 3.07%
wpBeforeTemplate 19.4 ms +5.21% -1.13% 19.1 ms +2.51% -0.94% 1.57%
wpTemplate 13.31 ms +3.23% -2.93% 12.95 ms +1.39% -2.63% 2.78%
wpTotal 33 ms +3.76% -2.15% 32.22 ms +4.5% -1.58% 2.42%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric f0c447d trunk % Change
mediaProcessingJpeg 326.78 ms +1.12% -0.41% 327.51 ms +0.95% -1.06% -0.22%
mediaProcessingAvif 4859.75 ms +0.67% -0.29% 4852.26 ms +0.86% -0.2% 0.15%
mediaProcessingJpegToAvif 3394.16 ms +0.14% -0.39% 3405.06 ms +0.22% -0.68% -0.32%

media-upload

Metric f0c447d trunk % Change
jpegUploadProcessing 1472.84 ms +1.24% -1.91% 1452.31 ms +0.87% -0.67% 1.41%
pngUploadProcessing 234.94 ms +3.33% -2.88% 230.51 ms +4.96% -3.22% 1.92%
largeJpegUploadProcessing 1442.17 ms +0.39% -0.38% 1444.37 ms +0.18% -0.72% -0.15%
multipleImageUploadProcessing 1504.6 ms +3.71% -0.81% 1525.75 ms +10.26% -0.49% -1.39%

post-editor

Metric f0c447d trunk % Change
serverResponse 477.5 ms +3.37% -9.48% 492.36 ms +1.42% -10.26% -3.02%
firstPaint 448 ms +10.14% -15.22% 430.71 ms +8.45% -9.64% 4.01%
domContentLoaded 804.31 ms +5.73% -1.03% 814.74 ms +1.32% -0.35% -1.28%
loaded 805.25 ms +5.72% -1.01% 816.1 ms +1.27% -0.36% -1.33%
firstContentfulPaint 457.84 ms +7.78% -3.49% 458.97 ms +3.78% -0.82% -0.25%
firstBlock 2161.72 ms +7.6% -1.66% 2197.02 ms +0.72% -1.14% -1.61%
type 16.15 ms +1.36% -3.72% 15.89 ms +11.71% -7.8% 1.64%
typeWithoutInspector 16.99 ms +14.54% -5.47% 16.87 ms +10.55% -7.94% 0.71%
typeWithTopToolbar 22.4 ms +6.03% -5.8% 23.62 ms +5.97% -1.1% -5.17%
typeContainer 8.04 ms +5.22% -18.16% 8.81 ms +11.24% -6.81% -8.74%
focus 136.11 ms +8.05% -5.69% 126.38 ms +7.19% -5.01% 7.7%
firstFocus 265.75 ms +0% -0% 303.26 ms +0% -0% -12.37%
selectAll 460.62 ms +0.02% -3.73% 418.57 ms +6.19% -1.17% 10.05%
undo 34.82 ms +6.46% -5.08% 30.42 ms +6.54% -4.04% 14.46%
listViewOpen 90.94 ms +3.94% -15.86% 76.73 ms +9.02% -4.93% 18.52%
inserterOpen 45.5 ms +9.54% -13.1% 39.82 ms +13.59% -4.45% 14.26%
inserterHover 11.33 ms +7.59% -11.74% 10.78 ms +12.24% -8.16% 5.1%
inserterSearch 8.18 ms +12.71% -6.6% 7.84 ms +8.42% -8.93% 4.34%
loadPatterns 646.41 ms +9.7% -3.78% 626.43 ms +3.22% -4.77% 3.19%
wpTotal 467.92 ms +3.11% -9.68% 481.57 ms +1.65% -10.33% -2.83%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric f0c447d trunk % Change
serverResponse 478.15 ms +1.7% -7.4% 475.66 ms +2.71% -7.72% 0.52%
firstPaint 440.23 ms +8.87% -7.73% 427.98 ms +2.55% -8.4% 2.86%
domContentLoaded 868.55 ms +2.17% -2.29% 862.83 ms +0.98% -1.44% 0.66%
loaded 869.8 ms +2.14% -2.28% 863.96 ms +0.97% -1.41% 0.68%
firstContentfulPaint 489.76 ms +6.57% -4.75% 486.25 ms +2.44% -1.39% 0.72%
firstBlock 2633.07 ms +0.77% -1.34% 2649.02 ms +0.4% -1.32% -0.6%
type 17.77 ms +7.48% -4.05% 18.35 ms +8.56% -2.94% -3.16%
navigate 125.39 ms +9.27% -1.15% 117.95 ms +1.59% -3.07% 6.31%
loadPatterns 1574.12 ms +5.28% -11.64% 1544.58 ms +0.87% -9.29% 1.91%
loadPages 1025.1 ms +1.71% -2.03% 991.11 ms +0.84% -1.72% 3.43%
wpTotal 468.66 ms +1.69% -7.53% 466.08 ms +2.72% -7.88% 0.55%
wpMemoryUsage 12.82 MB +0% -0% 12.79 MB +0% -0% 0.25%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

1da1c9d Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

should select synced pattern in /test/e2e/specs/editor/various/writing-flow.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator:  locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
Expected: focused
Received: inactive
Timeout:  5000ms

Call log:
  - Expect "toBeFocused" locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]') with timeout 5000ms
  - waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
    14 × locator resolved to <div tabindex="0" role="document" draggable="true" data-title="Pattern" data-type="core/block" data-is-drop-zone="true" aria-label="Block: Pattern" id="block-972cda29-9acb-48d9-8478-41d77b3187a7" data-block="972cda29-9acb-48d9-8478-41d77b3187a7" class="block-editor-block-list__block wp-block is-selected is-reusable block-library-block__reusable-block-container wp-block-block block-editor-block-list__layout">…</div>
       - unexpected value "inactive"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:1464:5

1da1c9d Run

The time zone abbreviation and its infotip only show when the site time
zone differs from the user's, which the existing stories never set up.
Also render the time zone story in its own iframe on the docs page, so
its site time zone setting does not apply to the other stories there,
and update the changelog entry.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant