21. Interactivity API

·

One of the most exciting upcoming features for WordPress will be introduced with the Interactivity API in WordPress 6.5.

Remember that you can listen to this program from Pocket Casts, Spotify, and Apple Podcasts or subscribe to the feed directly.

Program transcript

Hello, I’m Javier Casares, and you’re listening to WordPress Podcast, bringing the weekly news from the WordPress Community.

You’ll find updates from February 19th to 25th, 2024.

A year ago, we saw for the first time a demo website where everything seemed dynamic. Interacting with the site was simple, fast, and easy.

The example was a website with a list of movies, data, and among other things, you could mark a movie as a favorite or watch a trailer.

In the latter case, the video would overlay on the screen, and you could continue browsing without the video closing.

The release was planned a month ago when the first final version that would be included in WordPress 6.5 was proposed.

The Interactivity API, as its name suggests, allows interaction with WordPress sites, creating a dynamic layer on the frontend, much like what is usually done with AJAX, but with a clear Blocks-first and PHP-first strategy, backward compatible, reactive, high-performance, and with less JavaScript.

The first experiments started two years ago and culminated in Gutenberg 16.2. With its release in mind, WordPress 6.4 already includes many changes in blocks that allowed functioning with the private system of the Interactivity API, which, as a result, enabled the launch of the LightBox in images.

Now, with a small snippet of JavaScript indicating what you want to do, and a PHP render designing how it’s going to be done, we can have simple examples that allow a much more dynamic operation of WordPress.

New week, new version. WordPress 6.5 beta 2 is available, waiting for the final version to arrive on March 26.

And now that we have a new version of WordPress 6.5, we also know some more things we will encounter. One of them is the support for AVIF images, a modern format that can compress them up to 50% compared to JPEG, even with HDR support.

All browsers already support it, so it’s even possible to make all uploaded JPEGs automatically convert to AVIF, although it seems not all servers are equipped to generate this type of images.

An important element introduced in the Core Trac is the ability to mark a task with a sustainability label. The goal of these tasks from a coding perspective is the improvement and optimization of some tasks WordPress does. A simple example is the analysis to see whether a website uses HTTPS, which until now was run twice a day, with the computational cost it entails, to become an on-demand Site Health indicator.

On the Developer Blog, we have the first part of a detailed explanation of how to use the Blocks Bindings API, something awaited since WordPress 5.0 when the new editor was launched, and that, although still in a limited form, connects the content of a block with an external element.

This first entry refers to how to connect content with WordPress’s native Custom Fields, starting with a brief explanation of how blocks and blocks.json work, putting as examples how to connect the content of a paragraph with the Custom Field, or how to connect an image with these fields.

What things will be possible to use in this first foray into WordPress 6.5? In terms of text, paragraphs and titles, will be able to modify their content, images will be able to synchronize the link, title, and alternate text, and buttons their link, texts, and relationships.

Can you imagine selecting an item from a list and the button changes according to what is selected? Yes, it will be possible to do this natively, without external scripts.

The Training team has questioned whether a minimum of accessibility is being met in everything done by the team, and the possibility of bringing some elements closer to the content creation and review process.

An easily achievable first goal is to comply with WCAG 2.0 AA in content creation and validate that these minimums are being met, in addition to helping creators understand and be aware of these accessibility rules that include having alternative texts in media, subtitles in videos, audio-description of visible elements in videos, or contrast, among others.

An error from BuddyPress 12.0 to 12.2 has led to the release of BuddyPress 12.3, which fixes this and other errors.

Additionally, BuddyPress Classic 1.4 has been launched to help those with earlier versions to use plugins, themes, and widgets not compatible with the latest versions.

As a closing note, WordPress has been incorporated as a project into the Contributor Covenant. The process of adapting the Community Code of Conduct began a few years ago, and in recent weeks it has been updated in most places where WordPress contributes, including GitHub.

And finally, this podcast is distributed under a Creative Commons license as a derivative version of the WordPress Podcast in Spanish; you can find all the links for more information at WordPress Podcast .org or follow the content in Catalan, Spanish, and French.

Thanks for listening, and until the next episode!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *