Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#64471 new enhancement

Add cross-document View Transitions on the frontend

Reported by: westonruter's profile westonruter Owned by:
Milestone: 7.0 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: ui, accessibility Cc:

Description (last modified by westonruter)

Cross-document View Transitions enable multi-page applications (i.e. regular WordPress sites) to have a fluid navigation experience similar to a single-page app. The View Transitions feature plugin in Performance Lab has been very well received. (Source code is available on GitHub.) This ticket is to propose merging that feature plugin into core.

The feature is now implemented in all browsers, except for Firefox (see Bugzilla 1860854). Nevertheless, it is purely a progressive enhancement, the same as Speculative Loading, so Firefox users will not experience a degraded experience.

Note that the View Transitions feature goes best with Speculative Loading (initially merged in WP 6.8), since this reduces the latency between a link click and the transition starting. Increasing the eagerness of the speculations will improve the view transition experience (e.g. #64066).

The plugin does have a view-transitions theme support with the following defaults:

<?php
array(
        'post-selector'              => '.wp-block-post.post, article.post, body.single main',
        'global-transition-names'    => array(
                'header' => 'header',
                'main'   => 'main',
        ),
        'post-transition-names'      => array(
                '.wp-block-post-title, .entry-title'     => 'post-title',
                '.wp-post-image'                         => 'post-thumbnail',
                '.wp-block-post-content, .entry-content' => 'post-content',
        ),
        'default-animation'          => 'fade',
        'default-animation-duration' => 400,
)

There is also a user interface in the plugin to be able to configure View Transitions for themes which haven't added view-transitions theme support. This UI should be out of scope for the core merge, given the Decisions, not options philosophy of WordPress.

Merging this feature into core may be premature given that there are still some outstanding issues, so it may need to move to Future Release.

This was discussed in the Performance Team 2025 year-end chat.

See #64470 for implementation in WP Admin.

Change History (4)

#1 @westonruter
3 weeks ago

  • Description modified (diff)

#2 @westonruter
3 weeks ago

  • Description modified (diff)

This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.


3 weeks ago

#4 @joedolson
3 weeks ago

  • Focuses accessibility added

See comment on #64470.

Note: See TracTickets for help on using tickets.