From 96c26acafd80a5da472e8bbbf41bf6a197ba8c6f Mon Sep 17 00:00:00 2001 From: audrasjb Date: Thu, 12 May 2022 14:06:21 +0000 Subject: [PATCH] Taxonomy: Set `use_desc_for_title` to false by default in `wp_list_categories()` This change removes the default `title` attribute of category links returned by `wp_list_categories()`, for better accessibility. Props just0nequestion, joyously, andrija, audrasjb, sabernhardt. Fixes #55530. See #24766. Built from https://develop.svn.wordpress.org/trunk@53392 git-svn-id: http://core.svn.wordpress.org/trunk@52981 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 8c34b0e985..250c5d378f 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -483,6 +483,7 @@ function wp_dropdown_categories( $args = '' ) { * @since 2.1.0 * @since 4.4.0 Introduced the `hide_title_if_empty` and `separator` arguments. * @since 4.4.0 The `current_category` argument was modified to optionally accept an array of values. + * @since 6.1.0 Default value of the 'use_desc_for_title' argument was changed from 1 to 0. * * @param array|string $args { * Array of optional arguments. See get_categories(), get_terms(), and WP_Term_Query::__construct() @@ -519,7 +520,7 @@ function wp_dropdown_categories( $args = '' ) { * @type string $title_li Text to use for the list title `
  • ` element. Pass an empty string * to disable. Default 'Categories'. * @type bool|int $use_desc_for_title Whether to use the category description as the title attribute. - * Accepts 0, 1, or their bool equivalents. Default 1. + * Accepts 0, 1, or their bool equivalents. Default 0. * @type Walker $walker Walker object to use to build the output. Default empty which results * in a Walker_Category instance being used. * } @@ -549,7 +550,7 @@ function wp_list_categories( $args = '' ) { 'style' => 'list', 'taxonomy' => 'category', 'title_li' => __( 'Categories' ), - 'use_desc_for_title' => 1, + 'use_desc_for_title' => 0, ); $parsed_args = wp_parse_args( $args, $defaults ); diff --git a/wp-includes/version.php b/wp-includes/version.php index b58884d246..43f70a1169 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53391'; +$wp_version = '6.1-alpha-53392'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.