From ddd50e378200c974b736615d501e97186465f3f7 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Mon, 26 Jun 2023 18:15:22 +0000 Subject: [PATCH] Editor: Add a `description` key to `theme.json` style variations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changeset adds `description` to `VALID_TOP_LEVEL_KEYS` in `class-wp-theme-json.php` to allow for accessibility improvements. The description is added to the ARIA label of the style variation container. If the style variation has no description, only the title is used. One purpose is to use the text description to improve the style variation preview in the WordPress.org theme directory. See https://github.com/WordPress/gutenberg/pull/45242. Props ramonopoly, poena. Fixes #58614. --Cette ligne, et les suivantes ci-dessous, seront ignorées-- M trunk/src/wp-includes/class-wp-theme-json.php Built from https://develop.svn.wordpress.org/trunk@56041 git-svn-id: http://core.svn.wordpress.org/trunk@55553 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme-json.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php index eef9715755..2fcf39a20a 100644 --- a/wp-includes/class-wp-theme-json.php +++ b/wp-includes/class-wp-theme-json.php @@ -313,10 +313,12 @@ class WP_Theme_JSON { * @since 5.8.0 As `ALLOWED_TOP_LEVEL_KEYS`. * @since 5.9.0 Renamed from `ALLOWED_TOP_LEVEL_KEYS` to `VALID_TOP_LEVEL_KEYS`, * added the `customTemplates` and `templateParts` values. + * @since 6.3.0 Added the `description` value. * @var string[] */ const VALID_TOP_LEVEL_KEYS = array( 'customTemplates', + 'description', 'patterns', 'settings', 'styles', diff --git a/wp-includes/version.php b/wp-includes/version.php index db41948958..249586fc10 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-56040'; +$wp_version = '6.3-alpha-56041'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.