Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#58614 closed enhancement (fixed)

Add a description key to theme.json style variations

Reported by: ramonopoly's profile ramonopoly Owned by: audrasjb's profile audrasjb
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.3
Component: Editor Keywords: has-patch gutenberg-merge commit
Focuses: accessibility Cc:

Description (last modified by ramonopoly)

Add description to VALID_TOP_LEVEL_KEYS in class-wp-theme-json.php to allow for accessibility improvements.

See Gutenberg plugin PR: https://github.com/WordPress/gutenberg/pull/45242

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.

Style variations are mostly visual, and there needs to be a text alternative that describes them.

One purpose is to use the text description to improve the style variation preview in the WordPress.org theme directory.

props @poena

Change History (5)

#1 @ramonopoly
10 months ago

  • Description modified (diff)

This ticket was mentioned in PR #4687 on WordPress/wordpress-develop by @ramonopoly.


10 months ago
#2

Backporting changes from https://github.com/WordPress/gutenberg/pull/45242

Adds description to VALID_TOP_LEVEL_KEYS in class-wp-theme-json.php to allow for an accessibility improvement.

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.

props @carolinan

Trac ticket: \https://core.trac.wordpress.org/ticket/58614

#3 @audrasjb
10 months ago

  • Focuses accessibility added
  • Keywords commit added
  • Owner set to audrasjb
  • Status changed from new to assigned

Thanks for the patch!
Self assigning for commit.

#4 @audrasjb
10 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 56041:

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

Note: See TracTickets for help on using tickets.