Updates to Script Modules in 6.7
WordPress 6.7 introduces a new @wordpress/a11y script module and a new API to pass script module data from the server to the client.
@wordpress/a11y Script Module
WordPress 6.7 includes a new @wordpress/a11y script module. It has the same interface as the wp-a11y script so it should be familiar and easy to use. The @wordpress/interactivity-router module uses @wordpress/a11y and has a good example of how it can be used and take advantage of deferred loading:
import( ‘@wordpress/a11y’ ).then( ( { speak } ) => speak( message ), // Ignore failures to load the a11y module. () => {} );
To
This is the first part of the article
Updates to Script Modules in 6.7
