WordPress 6.4 Accessibility Improvements

Thank you to @sereedmedia and @joedolson for writing this post.

This post seeks to provide an overview of the many accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) improvements and fixes coming to WordPress 6.4. This release addresses numerous issues that affect accessibility and general UIUI User interface consistency, including many long-standing wp-adminadmin (and super admin) bugs, such as a six-year-old issue adjusting the relative proximity of interface buttons “Delete Menu” and “Save Menu.”

If you’re interested in improving WordPress accessibility, please join the #accessibility channel in MakeWP SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. and check out how to get involved. There are numerous contributing opportunities, such as testing, giving feedback, and working on accessibility issues.

Site Editor

The Site Editor includes improvements for consistent labeling and semantics in pattern and template management and the Navigation blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience..

  • #53755 – Comments form: Accessibility fixes for back-end
  • #53755 – Add missing aria roles to the ‘Replace template part’ menu item
  • #53754 – Add missing aria roles to the ‘Create template part’ menu item
  • #53739 – Add missing aria roles to the ‘Create pattern’ menu item
  • #52597 – Site Editor: Unify the delete button style in the dropdown menu with red
  • #53469 – Add accessible description of current Navigation block state
  • #53462 – Implement accessible version of Navigation overlay preview toggle control
  • #54418 – Navigation: Add ariaLabel block support
  • #52177 – Navigation block: Don’t close submenu when it has focus
  • #52170 – Navigation block: Do not toggle aria-expanded on hover when the overlay menu is opened
  • #53373 – Search Block: Fix unintended wrapping of button text in “Button only” style
  • #52710 – Return focus more from focus return hook
  • #52678 – My patterns page: Increase color contrast for the toggle group
  • #52641 – Change Delete page menu item to Move to trashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days..
  • #52634 – Password protected field: Remove autofocus and improve placeholder text consistency.
  • #52622 – Change password input to type text so contents are visible.
  • #52603 – Do not autofocus page title field in the ‘Draft a new page’ modal dialog
  • #52592 – Site Editor: Fix navigation menuNavigation Menu A theme feature introduced with Version 3.0. WordPress includes an easy to use mechanism for giving various control options to get users to click from one place to another on a site. sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. actions order and label
  • #52251 – Navigation block: Add notice on reduced accessibility
  • #52271 – Site Editor: update headings hierarchy in the ‘Manage all’ screens
  • #52263 – Fix incorrect aria-describedby attributes for theme patterns
  • #52930 – [Commands]: Add aria-activedescendant attribute to suggestions

Block Editor

The general block editor experience focuses on making labeling clearer and more consistent and improving the semantics of block and editor HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers..

  • #52885 – Edit site: Add missing label to post status password protected input field
  • #53691 – [a11yAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)] Fix: aria-haspop, aria-expanded attributes on the link format button.
  • #53692 – [a11y] Fix: aria-haspop and aria-expanded attributes on the inserter button.
  • #54324 – Table block: Fix semantic structure for screen readers on back-end
  • #54498 – Improve Notice component accessibility.
  • #54687 – Paragraph: Make ‘aria-label’ consistent with other blocks
  • #54590 – Allow Modal to place focus on first element within contents via new APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.
  • #54206 – Allow using a button element for button blocks
  • #54184 – Update nofollow control label
  • #52255 – Making Circular Option Picker a listbox
  • #45801 – Improve the placeholder instructions accessibility.
  • #52932 – ColorPalette, BorderControl: Don’t hyphenate HEX value in aria-label
  • #52653 – Modal: Fix loss of focus when clicking outside
  • #52246 – Improve consistency of the Post editor and Site editor Document actions
  • #52495 – Item: Unify focus style and add default font styles
  • #53693 – [a11y] Fix: aria-haspop and aria-expanded attributes on list view button.
  • #54843 – Footnotes: Add aria-label to return links

User Interface

WordPress 6.4 fixes many long-term spatial layout and usability issues in the WordPress UI. Key changes include adjusting spacing between elements, repositioning certain actions for better flow, and using more intuitive icons, like replacing the ‘x’ character with a clearer icon.

  • #40822 – Addressing proximity in the admin area.
  • #56594 – Change position of “Delete menu” action.
  • #58493 – User Profile Page: Vertical spacing inconsistency between label and field on smaller screens.
  • #59371 – Adjust theme details buttons to improve proximity of controls.
  • #59372 – Adjust theme details buttons in CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. to improve proximity of controls.
  • #58785 – Show dashicons-dismiss instead of the character ‘x’ when we talk about the dashicon-dismiss.

Admin UI and Messages

With an emphasis on accessible messaging within the admin area, 6.4 addresses issues like making “Add New” links more descriptive, improving spoken messages for voice output, and adjusting the order and presentation of form elements and notifications.

  • #47125 – Admin: clarify the “Add New” links for better accessibility.
  • #58573 – Site Health: Improve the speak() messages.
  • #30685 – Better Login Error&Message Displaying.
  • #59229 – Add new post/page: admin notice when JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. is off can’t install pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party by single click.
  • #58738 – Widgets page: Add missing H1 and admin notice when JS is off.
  • #58703 – wp-list-table: <label> is preceding <input> in the checkbox column.

Media-Related Fixes

As part of the lead-in to the planned Media Library updates, 6.4 enhances accessibility in a variety of media elements. Adjustments include adding alternative text support, improving select state issues in the Media Library, adhering to device settings, and ensuring focus states are maintained when editing images.

  • #58582 – XML-RPC API: Add alt field support.
  • #58756 – Media Library Improvements: UI, Non-Closing Options, and Button Select State Issues in Image Editing.
  • #55723 – Thumbnails Gifs for Plugins do not respect “no motion” device settings.
  • #59353 – Loss of focus when closing Image Rotation menu.

All 6.4 accessibility tickets are viewable in the WordPress Trac.

#6-4

Dev Chat Summary, November 1, 2023

The notes from the weekly WordPress developers chat which took place on November 1, 2023 at 20:00 UTCin the core channel of Make WordPress Slack.

Key Links

Announcements

WordPress 6.4 Release Candidate 3 was released just before Dev Chat – please help test and make the release the best it can be. All details are on the post. Thanks to everyone who contributed towards this.

Reminder: Dev Chat continues at 20:00 UTC throughout the year and does not change with daylight saving changes.

Highlighted Posts

A recording of the Hallway hangout on performance improvements in WordPress 6.4 is now available. The main points are also summarized on the post for anyone not able to access the recording.

Call for 6.4x release managers – this followed a discussion in Dev Chat last week. Please add a comment to the post if you are interested in supporting the maintenance and minor releases. Thanks to @jorbin for putting this together.

Reminder: Call for contributors to assist with 6.4 End User documentation. Extra assistance will be appreciated to help with this as we move towards the release day.

What’s new in Gutenberg 16.9.

Release Updates

Next major WordPress release: 6.4

Release candidates and rest of the cycle

RC3 was the last scheduled Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta)..

@hellofromtonya explained that another RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). could possibly happen in the following circumstances. If a regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5.(s) gets reported and resolved, then yes, another might happen. But currently all regressions are resolved and shipped in RC3!

Next week’s schedule:

  • Dry Run – on Nov 6, 2023.
  • 24 hour code freeze starts after the Dry Run.
  • 6.4.0 release party starts on Nov 7, 2023 after the 24 hour code freeze expires.

Any issues relating to 6.4?

No other issues were raised during the meeting.

Relevant 6.4 links

No new links were published at the time of the meeting.

Field Guide for 6.4

@webcommsat: In addition to the Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page., you can also find all Developer Notes relating to 6.4 using this tag. If you think a change would benefit from an additional dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase., please add it to the Documentation Tracker for 6.4. You can also tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) one of the docs release co-leads in a message in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. if you want to discuss the possibility of an additional dev note and do not have access to the tracker.

Release parties schedule for 6.4

6.4 Release Candidates phase

This detailed guide will walk you through testing features in WordPress 6.4.

Roadmap to 6.4 – this release is scheduled for November 7, 2023.

6.4 Development Cycle

Future releases: 6.5

Timings and squad

  • @joemcgill followed up the question at last week’s dev chat on the formation of a release squad for 6.5.
  • @chanthaboune is thinking through the timing of releases across the year, and therefore there is no clear date for the first release of 2024 as yet. She hopes to bring a draft of suggested dates/ times by Monday November 6, 2023. This is the ‘only blockerblocker A bug which is so severe that it blocks a release.’ for a call for volunteers. One person has contacted Josepha so far to participate in 6.5.
  • General agreement in the meeting for early planning for the next release.
  • the discussion on Slack.

Triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. tickets for 6.5

  • @oglekler requested triages to start as soon as possible, as trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. is already open and 6.5 Alpha has begun. She raised a call for volunteers.
  • discussion followed on updating the core handbook to reflect that triages and bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrubs can be held at any time, and to clarify that any contributors wanting to run a scrub did not need to wait for a completed release cycle or for a squad to be formed. The possibility of a post highlighting and calling for volunteers was suggested for the future.
  • a number of experienced core developers are able to buddy or give advice to help anyone less familiar with running scrubs.
  • if you can volunteer to run a scrub, you can share details in a future dev chat or comment on the summary post, and also post the information in the Core SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel ahead of time to best ensure that others are aware and can gather to help at the scrub. The core triage lead or the Core Team Reps can also update the bug scrub post in Make/Core.
  • if you are wanting to run a scrub related to particular component(s), please contact the component maintainers who can help and share information on priority tickets or planned scrubs.

The full discussion on triaging and bug scrubs.

Tickets or components help requests

No tickets were mentioned in the meeting.

Open floor

Reminders for the following were brought up right before the meeting ended:

Call for contributors to assist with 6.4 End User documentation. Volunteers can also post in this thread from the meeting.

Call for 6.4x release managers

Next meeting

The next meeting will be on Wednesday November 8, 2023, at 20:00 UTC.

After Dev Chat posts for attention:

Hallway Hangout: Issues Triage Extending Gutenberg – note this will take place on November 10, 2023 at 16:00 UTC.

Are you interested in helping draft Dev Chat summaries? Volunteer at the start of the next meeting on the #core Slack channel or contact one of the Core Team reps.

Props to @zunaid321 for contribution to the notes, and to @marybaum for review.

#6-4, #6-5, #dev-chat, #meeting, #summary

Dev Chat Summary, October 25, 2023

The notes from the weekly WordPress developers chat which took place on October 25, 2023 at 20:00 UTC in the core channel of Make WordPress Slack.

Key Links

Announcements

WordPress 6.4 Release Candidate 2 is available – please help test and make the release the best it can be. All details are on the post. Thanks to everyone who contributed towards this.

Summary and Insights of Phase 3 related conversations

WordPress 6.4 Release Candidate Phase

WordPress 6.4 Field Guide

Highlighted Posts

Summary and Insights of Phase 3 related conversations

WordPress 6.4 Release Candidate Phase

WordPress 6.4 Field Guide

Release Updates

Next major WordPress release: 6.4

New 6.4 related posts

6.4 Release Candidates phase

Update from contributors on docs for this release:

  • Field Guide for 6.4
  • You can also find all Developer Notes relating to 6.4 using this tag
  • If you think a ticketticket Created for both bug reports and feature development on the bug tracker. needs a dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. and it has not been highlighted previously, send a message to Nalini on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. for those working on the docs release or add it to the Documentation Tracker for 6.4
  • Call for contributors to assist with 6.4 End User documentation

Any issues relating to 6.4 tickets?

Existing 6.4 useful links

Release parties schedule for 6.4

This detailed guide will walk you through testing features in WordPress 6.4.

Roadmap to 6.4 – this release is scheduled for November 7, 2023.

Bug Scrub Schedule 6.4

6.4 Development Cycle

Project Board for Editor Tasks for WordPress 6.4 on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/

GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/

What’s new in Gutenberg 16.9? (25 October) – Other than the new release update, nothing related to Gutenberg was brought up in the meeting.

Components & Tickets

The following tickets were raised in the meeting for feedback:

TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticket #59718: Short-term (WP 6.4) hotfix to prevent fatal error in standalone Gutenberg (<16.5)

Trac ticket #59289: About Page for 6.4 Release

Trac ticket #59722: Regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5.: class-wp-rest-server.php

For the above tickets check out the Slack discussion for more information.

Trac ticket #59723: Pattern file containing PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher constant from theme causes fatal error on update to WordPress 6.4 – was brought up by @hellofromtonya since this issue is in 6.3 and 6.4 and causes a fatal error during the upgrade process. Check out the Slack discussion for more info.

More tickets were brought up by @hellofromtonya as they need attention:

Trac ticket #59736: Regression: Singular blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. template – regression introduced in 6.4 by r56507. Has a patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. on it and explanation.

Trac ticket #59723: Pattern file containing PHP constant from theme causes fatal error on update to WordPress 6.4 – fatal error during WP upgrade

Trac ticket #55493: [Block] File: Embedded PDF fails to render in Safari – regression in File block introduced in 6.4

Trac ticket #59732: Theme live preview is brokenCustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. theme live previewers are broken, which 6.4 didn’t cause but help to emphasis it. There’s a patch that’s ready to test. Need to better understand its impact in 6.4.

Trac ticket #58281: Rollback Auto-Update (Rollback part 3) – check out the Slack discussion for more info as it was raised by @afragen

Open floor

@jeffpaul highlighted for post 6.4, the Community Summit Discussion Notes: Aligning processes and contributions between WordPress Core and Gutenberg. He especially drew attention to this topic to those who are active during the 6.4 release and particularly with the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress./Gutenberg interactions. He asked for them to share their insights and thoughts on the post to help improve planning, shared processes and to make things easier for the future.

@joemcgill raised a query on the planning and squads formation for the future major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope., 6.5, and the 6.4.1, 6.4.2 etc minor releases. The Slack discussion.

Next Meeting

The next meeting will be on Wednesday November 1, 2023, at 20:00 UTC.

Are you interested in helping draft Dev Chat summaries? Volunteer at the start of the next meeting on the #core Slack channel.

Props to @webcomms and @marybaum for input into the summary and for review.

#6-4, #6-5-2, #dev-chat, #meeting, #summary

Dev Chat agenda, November 1, 2023

The next weekly WordPress developers chat will take place on Wednesday, November 1, 2023 at 20:00 UTC in the core channel of Make WordPress Slack. Note, the 6.4 RC3 is scheduled for November 1, so there may be a change in Dev Chat timings if needed. Please check the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. channel for updates.

Further items will continue to be added as they come up in core and release leads channels on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..

Welcome and housekeeping

All are welcome to join Dev Chat.

If you can help with dev chat summaries, please raise your hand in the meeting. It is a busy time and additional people are appreciated.

Announcements

WordPress 6.4 Release Candidate 3 – was released today.

Highlighted posts

Due to time constraints during a release and to prioritize 6.4 items, some of the highlighted posts may not be raised during the live Dev Chat meeting.

Recording of the Hallway hangout on performance improvements in WordPress 6.4 is now available. The main points are also summarized on the post for anyone not able to access the recording.

Call for 6.4x release managers – this followed a discussion in Dev Chat last week. Please add a comment to the post if you are interested in supporting the maintenance and minor releases. Thanks @jorbin for putting this together.

Reminder: Call for contributors to assist with 6.4 End User documentation. Extra assistance will be appreciated to help with this as we move towards the release day.

What’s new in Gutenberg 16.9

Forthcoming release updates

Next major WordPress release: 6.4

Updates or important discussions relating to the final week of the release.

Any issues relating to 6.4?

Existing 6.4 useful links

Field Guide for 6.4

You can also find all Developer Notes relating to 6.4 using this tag. If you think another change would benefit from a dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. and it has not been highlighted previously, add it to the Documentation Tracker for 6.4.

Release parties schedule for 6.4

6.4 Release Candidates phase

This detailed guide will walk you through testing features in WordPress 6.4.

Roadmap to 6.4 – this release is scheduled for November 7, 2023.

Bug Scrub Schedule 6.4

6.4 Development Cycle

Project Board for Editor Tasks for WordPress 6.4 on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/

Tickets or Components help requests

This section is subject to change depending on the needs of the release.

Please add any items for this part of the agenda to the comments – tickets for 6.4 will be prioritized. If you can not attend dev chat live, don’t worry, include a note and the facilitator can highlight a ticketticket Created for both bug reports and feature development on the bug tracker. if needed.

Open floor

If you have any additional items to add to the agenda, please respond in the comments below to help the facilitator highlight them during the meeting.

#6-4, #agenda, #dev-chat

WordPress 6.4 RC3 postponed

The release party for WordPress 6.4 Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 3 will be postponed from October 30 to November 1 to allow for three important fixes:

  • #55706: Ensure the new Query blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.’s enhanced pagination works with all compatible patterns/template parts, including those in Twenty Twenty-Four.
  • #706: Twenty Twenty-Four: Change post pattern on home.html, update template slugs.
  • #59715: Ensure appropriate RTL stylesheets are loaded when selecting an RTL language.

The 6.4 cycle page has been updated accordingly. We will host the RC3 release party on November 1 at 16:00 UTC in the #core SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel.

Thank you for your patience and continuous commitment to making WordPress!


Props to @meher, @cbringmann, @hellofromtonya, @siobhyb, and @luisherranz for collaborating on this post.

#6-4

Dev Chat agenda, October 25, 2023

(Update – call for 6.4 end user documentation contributors)

The next weekly WordPress developers chat will take place on Wednesday, October 25, 2023 at 20:00 UTC in the core channel of Make WordPress Slack.

Further items will continue to be added as they come up in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and release leads channels on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..

Welcome and housekeeping

All are welcome to join Dev Chat.

Summary of Dev Chat, October 18, 2023 – thanks to @ironprogrammer.

Announcements

WordPress 6.4 Release Candidate 2 is available – please help test and make the release the best it can be. All details are on the post. Thanks to everyone who contributed towards this..

Highlighted posts

Due to time constraints during a release and to prioritize 6.4 items, some of the highlighted posts may not be raised during the live Dev Chat meeting.

Summary and insights from discussions on Phase 3

Forthcoming release updates

Next major WordPress release: 6.4

Forthcoming milestone:

New 6.4 related posts

6.4 Release Candidates phase

Update from contributors on docs for this release:

  • Field Guide for 6.4
  • You can also find all Developer Notes relating to 6.4 using this tag
  • If you think a ticketticket Created for both bug reports and feature development on the bug tracker. needs a dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. and it has not been highlighted previously, send a message to Nalini on Slack for those working on the docs release or add it to the Documentation Tracker for 6.4
  • Call for contributors to assist with 6.4 End User documentation

Any issues relating to 6.4 tickets?

Existing 6.4 useful links

Release parties schedule for 6.4

This detailed guide will walk you through testing features in WordPress 6.4.

Roadmap to 6.4 – this release is scheduled for November 7, 2023.

Bug Scrub Schedule 6.4

6.4 Development Cycle

Project Board for Editor Tasks for WordPress 6.4 on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/

GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/

Tickets or Components help requests

Please add any items for this part of the agenda to the comments – tickets for 6.4 will be prioritized. If you can not attend dev chat live, don’t worry, include a note and the facilitator can highlight a ticket if needed.

Open floor

If you have any additional items to add to the agenda, please respond in the comments below to help the facilitator highlight them during the meeting.

#6-4, #agenda, #dev-chat

Framework for storing revisions of Post Meta in 6.4

RevisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. are now supported for post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. on an opt-in basis. This feature is currently used by coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. for footnotes – enabling footnotes to be correctly previewed, stored in autosaved and stored and retrieved from revisions. In the future, this may be expanded to the featured imageFeatured image A featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. which is also stored in meta.

When registering a new meta field with register_meta or register_post_meta, the $args parameter accepts a new revisions_enabled argument. This defaults to false—set to true to opt in to revisions for this meta field. Note that the object type the meta is being created for must have revision support in order for the meta field to have revisions enabled. Attempting to enable meta revisions for a post type that doesn’t support revisions will result in a doing_it_wrong warning.

This feature is designed to lay the groundwork for future improvements to GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ as part of Phase 3: Collaboration. Care has been made to do this in a backwards compatible manner, but if you are unhooking anything in the post save/update process, please read this entire note and test your code before WordPress 6.4 is released

A new wp_post_revision_meta_keys filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. is introduced, which can be used to filter the list of meta fields to be revisioned. The post type is also passed to the filter, which can be used to adjust revisioning of meta fields.

// Example to add a `my_product_price` meta field to revisions.
function enable_revisions_for_product_price_field( $revisioned_keys ) {
	if ( ! in_array( 'my_product_price', $revisioned_keys, true ) ) {
		$revisioned_keys[] = 'product_price';
	}
	return $revisioned_keys;
}
add_filter( 'wp_post_revision_meta_keys', 'enable_revisions_for_product_price_field' );

The _wp_put_post_revision action, which fires once a revision is saved, includes a new parameter—the post ID associated with the revision. This is used by core to copy the meta data from the main post to the revision.

The wp_creating_autosave action, which fires before an autosave is stored, includes a new parameter `$is_update`, added to indicate if the autosave is being updated or was newly created.

Meta revisions are also stored for autosaves and when previewing posts, fixing a long standing bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. (#20299) that caused live post meta to be overwritten when post meta was previewed. This is because using update_post_meta to save meta to a revision actually resulted in it being saved to the parent post. With this change, developers can now opt in to meta revisions and core will correctly attach the meta data to the revision. Meta that has revisions is also restored when restoring an autosave or revision. 

The REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. revisions endpoint now returns meta when stored as part of a revision and the autosaves endpoint now handles storing of meta.

The new meta revision features are enabled in core via hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.; removing the hooks will disable the features:

To disable post meta revisions entirely, use:

remove_action( 'wp_after_insert_post', 'wp_save_post_revision_on_insert', 9, 3 );

To disable storing post meta on autosaves, use:

remove_action( 'wp_creating_autosave', 'wp_autosave_post_revisioned_meta_fields' );

To disable restoring meta when restoring revisions or autosaves, use:

remove_action( 'wp_restore_post_revision', 'wp_restore_post_revision_meta', 10, 2 );

Important note: as part of this change, the timing for the storing of post revisions has been changed. Previously, revisions were created before post meta had been saved by the REST API on the post_updated hook.  Revisions are now hooked on the wp_after_insert_post action, fired after post meta has been saved. 

Special backwards compatibility consideration has been given to plugins that may be unhooking post_updated from wp_save_post_revision to disable revisions—in that case, core ensures revisions are still not created.

Note that if you are querying for meta directly, your query may need to be adjusted to take into account the possibility of meta values tied to revisions by making sure your query includes the post_parent field.


Props to @westonruter, @jorbin and @webcommsat for reviewing.

#6-4, #dev-notes, #dev-notes-6-4

WordPress 6.4 Field Guide

This guide shares more in-depth changes that you will find in 6.4 and is published in the Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). cycle to help inform WordPress developers, extenders, and others. The release squad and many contributors across the global project have worked to bring these changes, and you can follow this work and add to the contribution using the ticketticket Created for both bug reports and feature development on the bug tracker. systems in Trac and GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/.

Some fascinating stats! TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. has about 268 tickets, 113 of which are enhancements and feature requests, 134 bug fixes, and 21 other tasks. This time, there are more than 64 tickets with a focus on performance, 17 for accessibility, and 16 for modernizing code and applying coding standards. GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/’s GitHub repo brings more than 1,400 updates/changes, providing to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. more than 420 enhancements, 445 bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes, and 42 accessibility improvements.

Changes in 6.4 are spread across about 45 core components. Below is the breakdown of the most important ones.

You can also find all Developer Notes relating to 6.4 as they continue to be published until the release goes live. You can follow them using this tag.

Updated Nov 14, 2023: overview posts available on accessibility and performance improvements in 6.4.

BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor

WordPress 6.4 is bringing six Gutenberg releases into the core – 16.2, 16.3, 16.4, 16.5, 16.6, 16.7. You will find Block HooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same., the ability to register their own media categories, changes to the @wordpress/components package, updates for the user interface components, and many other changes.

WordPress 6.4 introduces Block Hooks (#53987), a feature that provides an extensibility mechanism for Block Themes. This is the first step in emulating WordPress’ Hooks concept that allows developers to extend Classic Themes using filters and actions.

From WordPress 6.4, extenders can register their own inserter media categories and provide users with more options from which to choose.

6.4 brings in a number of notable changes to the @wordpress/components package.

There are a number of other changes, including a new background image block support, fluid typography, disabled layout controls globally or on a block basis by theme.json, Stabilized APIs for InnerBlocks, and much more.

New dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. (November 13, 2023) – For singular content, the output of block templates, for example, (single.html or page.html) will be automatically wrapped in the main query loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop..

Adminadmin (and super admin) notices

Two new functions abstract the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. markup generation to reduce the maintenance burden, encourage consistency, and enable argument and message filtering for all admin notices used widely in WordPress Core and the extender community.

General

A developer note will be added later on the following change:

Introduce wp_trigger_error() to complement _doing_it_wrong() #57686

HTML APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

WordPress 6.4 includes continued development of the HTML API, including the introduction of a minimal HTML Processor with the concept of breadcrumbs, and makes it possible to, for example, search for images that are direct children of a DIV.

Also included in 6.4, is the addition of a couple of CSSCSS Cascading Style Sheets./class helpers in the Tag Processor, which will make it possible to search for a tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) containing more than one class name, or to search for a tag not containing a given class name.

Media

New WordPress installations will now have attachment pages fully disabled for new sites. This will benefit SEO by avoiding attachment pages created by default, which were indexed by search engines and could have led to bad results for users and site owners. The change introduces a wp_attachment_pages_enabled database option to control the attachment pages’ behavior. In the dev note, there is information on how to update existing sites.

Additional performance improvements

A significant part of the 6.4 release brings performance improvements and greater efficiency to WordPress. An overview post on performance improvements in 6.4 is also available.

New functions get_options(), wp_prime_option_caches(), and wp_set_option_autoload_values() allow an enhanced performance of retrieving options from the database.

WordPress 6.4 brings many improvements to template loading.

  • Performance gains have been achieved by introducing caching using an object cache in a new method called WP_Theme::get_block_patterns().
  • Unnecessary checks were removed if a theme file existed in the theme functions that enhanced efficiency and performance. These improvements in the Themes API mean the current theme’s stylesheet directory is checked to ensure it matches the template directory, before further file existence checks are done. Improvements are also in the performance of get_block_theme_folders(). This is through a new method, WP_Theme::get_block_template_folders(), and improved error handling. The result is a quicker and more efficient lookup of block template folders within themes. WordPress developers and users can anticipate improved performance, reduced I/O overhead, and a smoother experience when working with block themes.

Improved image loading

Several enhancements to the wp_get_loading_optimization_attributes() function, which provides a central place to manage loading optimization attributes, specifically for images and iframes. 

Script Loader

In WordPress 6.4, script loading strategies are now employed for frontend scripts in core and bundled themes. For the most part, the defer loading strategy is used since it is more consistent in its loading behavior, in that a defer script always executes once the DOM has loaded; a script with async may actually block rendering if it is already cached. Additionally, loading with defer has been moved from the footer to the head so that they are discovered earlier while the document is loading and can execute sooner once the document is loaded.

Style loading

This dev note highlights the changes made in WordPress 6.4 to style loading. The main focus of the changes was to replace manually created style tags printed at the wp_head action with calls to wp_add_inline_style().

More performance-related changes

  • TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies.: The double sanitization in the get_term function has been stopped. This will prevent the unnecessary calls to sanitize_term, which was detrimental to performance. Trac ticket #58329.
  • Themes: The TEMPLATEPATH and STYLESHEETPATH constants have been deprecated. get_template_directory() and get_stylesheet_directory() should be used instead. Trac ticket #18298

And there’s more!

Some of the additional changes in 6.4 to highlight.

External libraries

jQuery has been updated to version 3.7.1. This release fixes a regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5. from jQuery 3.6.0 that resulted in rounded dimensions for elements in Chrome and Safari. Also, a (mostly) internal Sizzle method, jQuery.find.tokenize that was on the jQuery object was accidentally removed when they removed Sizzle in jQuery 3.7.0. That method has been restored.

Trac Ticket #59322

Users

WordPress 6.4 brings a number of key improvements to the HTML markup of the wp-login.php page to make its structure more optimal and allow developers to have more customized individual styling flexibility. #30685

Clarify the “Add New” links in the Admin for better accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)

In WordPress 6.4, the default values for the add_new label changed to include the type of content. This matches add_new_item and provides more context for better accessibility. The default value is ‘Add New Type’ for both hierarchical and non-hierarchical types. If you’ve previously used a label such as:

'add_new' => _x( 'Add New', 'Book', 'my-plugin' )

you are encouraged to change it to

'add_new' => __( 'Add New Book', 'my-plugin' )

Trac ticket #47125

Props to @swissspidy for this dev note.

Integration testing requirement change

PHPUnit Polyfills 1.1.0 is required for running integration tests with WordPress 6.4.

Trac ticket #59510

Props to @jrf for the information for this dev note.

HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. API

  • HTTP API: WP_Http_Curl and WP_Http_Streams classes and filters have been deprecated as these classes have not been used in WordPress Core since the introduction of the Requests library. Trac ticket #58705

RevisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.

Revisions are now supported for post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. on an opt-in basis. Trac ticket #20564


Props to @costdev, @bph, @nalininonstopnewsuk, @codente, @spacedmonkey, @desrosj, @flixos90 for input on this Field GuideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page., and @joemcgill, @clarkeemily, @cbringmann, @akshaya, @611shabnam, and @priethor for peer review.
Thank you to all those involved in collating, writing, and editing developer notes relating to 6.4.

#6-4, #dev-notes, #dev-notes-6-4, #field-guide

Updates to the HTML API in 6.4

WordPress 6.4 includes continued development of the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., including the introduction of a minimal HTML Processor in #58517 and the addition of a couple of CSSCSS Cascading Style Sheets./class helpers in the Tag Processor in #59209.

A minimal HTML Processor and its breadcrumbs.

When the HTML Processor was introduced in WordPress 6.2, it carried the stipulation that it did not understand HTML structure. While this is an intentional limitation so that the Tag Processor can maintain predictable performance and simplicity, it leaves certain conditions awkward and bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. prone. Consider, for example, the goal of finding an IMG element inside a surrounding DIV.

$processor = new WP_HTML_Tag_Processor( $html );

// Find the wrapping DIV element.
if ( ! $processor->next_tag( 'DIV' ) {
    return $html;
}

// Find the inner IMG element.
while ( $processor->next_tag( array( 'tag_closers' => 'visit' ) ) ) {
    // Abort if leaving the DIV wrapper before finding the image.
    if ( 'DIV' === $processor->get_tag() && $processor->is_tag_closer() ) {
        return $html;
    }

    if ( 'IMG' === $processor->get_tag() ) {
        do_something_to_img();
        return $processor->get_updated_html();
    }
}

This code maintains the safety against unexpected HTML inputs in the way that a regex-based approach would not, but it’s already a bit cumbersome, and could be mistaken by an unexpected HTML layout. For example, it assumes that a closing DIV tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) will appear and that it will only appear after the IMG. It will fail to recognize the nested IMG in the following HTML because of the nested DIV before it.

<div class="profile">
    <div class="name">WordPress</div>
    <img src="wordpress-logo.png">
</div>

The new WP_HTML_Processor() class is being built in order to not only understand HTML syntax, but also its semantics – it understands HTML structure and all the quirks involved when discussing “malformed HTML.” In WordPress 6.4 the HTML Processor is available, and it adds a new concept of “breadcrumbs” to the API.

Breadcrumbs represent the path into an HTML document for a given element and will be familiar to those who navigate around a document in the browser development tools.

A browser displays the breadcrumbs for a selected element when inspecting the document.

Breadcrumbs always start with HTML as the start of the path, will list every ancestor of a given element, and include the element itself as the last segment in the path. The HTML Processor introduces a few ways to use these:

  • It’s possible to search for this structure by supplying array( 'breadcrumbs' => $breadcrumbs ) inside a call to next_tag().
  • The get_breadcrumbs() method reports the entire breadcrumb array from HTML to the matched element.
  • The matches_breadcrumbs( $breadcrumbs ) method indicates whether the matched element can be found at the given breadcrumbs.

Using the example above, it’s possible to search for images that are direct children of a DIV.

$processor = WP_HTML_Processor::create_fragment( $html );

if ( ! $processor->next_tag( array( 'breadcrumbs' => array( 'DIV', 'IMG' ) ) ) {
    return $html;
}

do_something_to_img();
return $processor->get_updated_html();

Properly handling this structure comes with additional costs, so the HTML Processor cannot provide the predictable performance that the Tag Processor can. It should still be fast enough to use though when rendering a blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.’s output.

One important note about using the HTML Processor is that it’s a work-in-progress and only supports a subset of allowable HTML. If it encounters a tag or a specific kind of HTML it doesn’t support, then it will abort processing to avoid corrupting your content. The HTML Processor reports if it gave up with the get_last_error() method. Currently, there’s only a small set of HTML that the HTML Processor supports, so don’t be surprised when it aborts before finding the tag you’re looking for. Each WordPress release will expand this support until it can read all possible HTML documents.

if ( $processor->next_tag( 'breadcrumbs' => array( 'figure', 'img' ) ) ) {
    // The tag was found in the HTML document.
    do_something_to_img();
    return $processor->get_updated_html();
}

if ( null === $processor->get_last_error() ) {
    // The tag was not in the HTML document.
} else {
    // It was not possible to determine if the tag was in the HTML document.
}

For more complicated queries, the matches_breadcrumbs() method can be used inside a next_tag() loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop.. The * value is a special wildcard term. It only matches one of any tag, so if no open element exists in its place then the match fails.

while ( $processor->next_tag( 'IMG' ) ) {
    // Skip images that are already inside a FIGURE element.
    if ( $processor->matches_breadcrumbs( array( 'FIGURE', 'IMG' ) ) ) {
        continue;
    }

    // Only process images that are great-grand-children of a BLOCKQUOTE element.
    if ( $processor->matches_breadcrumbs( array( 'BLOCKQUOTE', '*', '*', 'IMG' ) ) ) {
        do_something_to_img();
    }
}

The HTML Processor is a subclass of the Tag Processor and so retains all the underlying methods to read and modify the HTML. In the future, it will be possible to insert and remove entire tags and to read and modify the inner markup inside a tag. In WordPress 6.4, however, the only new feature is the concept of breadcrumbs.

CSS helpers for the Tag Processor

It’s been possible to search for a tag containing a specific class with next_tag( array( 'class_name' => $class_name ) ) but not possible to search for a tag containing more than one class name, or to search for a tag not containing a given class name. In WordPress 6.4, it’s possible to do this with the new has_class() method. This method does exactly what it sounds like: it reports if a matched tag contains the given class name in its class attribute.

$processor = new WP_HTML_Processor( $html );

while ( $processor->next_tag() ) {
    // Skip an element if it's not supposed to be processed.
    if ( $processor->has_class( 'data-wp-ignore' ) ) {
        continue;
    }

    if ( $processor->has_class( 'data-wp-context' ) && $processor->has_class( 'active' ) ) {
        // Process the context…
    }
}

The has_class() method knows how to split CSS class names properly. It’s valuable to rely on this method instead of manually processing the class attribute value to avoid several common pitfalls, especially when wanting to know about the presence or absence of multiple class names.


Props to @bph @codente @webcommsat and @nalininonstopnewsuk for peer review.

#6-4, #dev-notes, #dev-notes-6-4

Dev Chat Summary, October 18, 2023

The WordPress Developers Chat meeting took place on October 18, 2023 at 20:00 UTC in the core channel of Make WordPress Slack.

Key Links

Announcements

Highlighted Posts

  • WordPress 6.4 Release Candidate Phase: Learn or refresh your knowledge of what happens during RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).. Questions? Please post them in the comments.
  • 6.4 Dev Notes: It’s been a busy time in the Make/CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blogblog (versus network, site)! Stay updated on the latest technical updates by checking out posts conveniently tagged with #dev-notes-6-4. Major props to dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. authors and wranglers who have worked tirelessly to make this happen! 🎉
  • WordPress core is now using Playwright for all browser-based tests: e2e fans rejoice! This milestone promises improved test stability and better options for authoring tests. If you’ve been holding back while the migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. from Puppeteer to Playwright has been underway, now is a great time to jump back in to improve Core e2e coverage.
  • What’s new in Gutenberg 16.8 (11 October): Check out updates to the Cover blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience., Font Library, and more in this roundup of the latest release.

Release Updates

WordPress 6.4

RC 2 is scheduled for next Tuesday, October 24, 2023.

Stay in the loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. with 6.4 by following:

Additional release updates from the floor included:

  • A question was raised in #6-4-release-leads about removing some GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/-only packages from the next npm package update to Core.
  • Some 6.4 dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. drafts are still needed for a couple of areas, so a gentle reminder was raised to keep the official 6.4 Documentation Tracker updated with latest progress. Reach out on the Tracker for help or to the Documentation release group in the #6-4-release-leads channel.

WordPress 6.3.2

  • WordPress 6.3.2 – Maintenance and Security release: This follow-up to 6.3.1 introduces several bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes and security updates. Make sure to update!
  • Keep tabs on the #6-3-release-leads channel for future updates.

Open Floor

Automated Welcome/Signposting for #core

@webcommsat asked if Core would consider utilizing an automated messaging/workflow tool similar to that used by Training. When users joined the channel, they would receive a private message from Slackbot that includes channel-specific info and links, such as the Dev Chat schedule, or orientation for new contributors and contributor days. Abha agreed to draft a proposal to seek broader input from Core and new contributors.

Use of noopener noreferrer in New Window/Tab Links

@presskopp had a question regarding use of rel="noopener noreferrer" in links with target="_blank", which were supposed to have been removed. To help resolve instances where this unneeded behavior remains (in Core and Gutenberg), contribute to TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker. #53843: Remove adding of rel=”noopener” to links with target=”_blank”.

Next Meeting

The next meeting will be on October 25, 2023 at 20:00 UTC.

Are you interested in helping draft Dev Chat summaries? Volunteer at the start of the next meeting on the #core Slack channel.

Props @webcommsat for peer review of this post.

#6-3, #6-4, #dev-chat, #meeting, #summary