Make WordPress Core

Opened 21 months ago

Closed 21 months ago

Last modified 9 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 (7)

#1 @ramonopoly
21 months ago

  • Description modified (diff)

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


21 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
21 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
21 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

@oandregal commented on PR #4687:


9 months ago
#6

Hey, this PR missed backporting one file (theme-i18n.json), see report and next steps at https://github.com/WordPress/gutenberg/pull/45242#issuecomment-2196574068

@ramonopoly commented on PR #4687:


9 months ago
#7

Hey, this PR missed backporting one file (theme-i18n.json), see report and next steps

Thanks @oandregal

I took a stab at it, but I'm not confident I've done everything correctly.

See comment: https://github.com/WordPress/gutenberg/pull/45242#issuecomment-2198826119

Note: See TracTickets for help on using tickets.