Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#58614 closed enhancement (fixed)

Add a description key to theme.json style variations

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

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
3 years ago

  • Description modified (diff)

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


3 years 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
3 years ago

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

Thanks for the patch!
Self assigning for commit.

#4 @audrasjb
3 years ago

  • Resolution → fixed
  • Status assigned → 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:


2 years 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:


2 years 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.