Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#55651 closed enhancement (fixed)

Associate the terms form fields with their descriptions

Reported by: afercia's profile afercia Owned by: joedolson's profile joedolson
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch add-to-field-guide
Focuses: accessibility Cc:

Description

The form fields to create and edit taxonomy terms in edit-tags.php and term.php do have descriptions. However, these descriptions are not semantically associated with the input fields.

By using the aria-describedby attribute, assistive technologies would be able to understand there's a programmatic association between the form fields and the descriptions. Screen readers, for example, would automatically read out the descriptions while tabbing through the form fields.

It's a small improvement but I'd say using aria-describedby in these cases should be a default practice.

See all the form fields (inlcuding the select element) in the screenshot below.

Attachments (2)

55651.png (296.4 KB) - added by afercia 2 years ago.
55651.diff (8.1 KB) - added by afercia 2 years ago.

Download all attachments as: .zip

Change History (9)

@afercia
2 years ago

#1 @audrasjb
2 years ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to 6.1

Moving for 6.1 consideration and adding good-first-bug workflow keyword as it looks like a great bugfix for new contributors :)

@afercia
2 years ago

#2 @afercia
2 years ago

  • Keywords has-patch added; good-first-bug removed

55651.diff is a first pass:

  • Adds aria-describedby and id attributes to the form HTML.
  • Adds an aria_describedby argument to wp_dropdown_categories(), to optionally print out an aria-describedby attribute.

Sorry for the good-first-bug keyword, I already had a patch ready :)

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


2 years ago

#4 @joedolson
2 years ago

  • Owner set to joedolson
  • Status changed from new to accepted

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


2 years ago

#6 @joedolson
2 years ago

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

In 53913:

Taxonomy: Associate field descriptions with fields.

Use aria-describedby to associate the field descriptions and instructions with the form fields when creating or editing taxonomy terms.

Props afercia.
Fixes #55651.

#7 @milana_cap
2 years ago

  • Keywords add-to-field-guide added
Note: See TracTickets for help on using tickets.