Make WordPress Core

Changeset 56041


Ignore:
Timestamp:
06/26/2023 06:13:04 PM (8 months ago)
Author:
audrasjb
Message:

Editor: Add a description key to theme.json style variations.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r56038 r56041  
    314314     * @since 5.9.0 Renamed from `ALLOWED_TOP_LEVEL_KEYS` to `VALID_TOP_LEVEL_KEYS`,
    315315     *              added the `customTemplates` and `templateParts` values.
     316     * @since 6.3.0 Added the `description` value.
    316317     * @var string[]
    317318     */
    318319    const VALID_TOP_LEVEL_KEYS = array(
    319320        'customTemplates',
     321        'description',
    320322        'patterns',
    321323        'settings',
Note: See TracChangeset for help on using the changeset viewer.