Make WordPress Core

Opened 2 weeks ago

Closed 13 days ago

Last modified 13 days ago

#62860 closed enhancement (fixed)

Consider removing title attributes from get_calendar() column headers

Reported by: sabernhardt's profile sabernhardt Owned by: audrasjb's profile audrasjb
Milestone: 6.8 Priority: low
Severity: normal Version:
Component: General Keywords: title-attribute 2nd-opinion has-patch
Focuses: accessibility Cc:

Description (last modified by sabernhardt)

Related: #24766

The days of the week in calendars have abbreviated visible text plus title attributes for the full day name. These title attributes have some value, but there might be a better way to present the information.

The column headers can show either a short day abbreviation or the initial letter.

Attachments (3)

Calendar-block-title-tooltip.png (25.6 KB) - added by sabernhardt 2 weeks ago.
Calendar block showing title tooltip for 'Monday'
before-patch.png (81.2 KB) - added by shailu25 2 weeks ago.
Before
after-patch.png (81.6 KB) - added by shailu25 2 weeks ago.
After Patch

Download all attachments as: .zip

Change History (10)

@sabernhardt
2 weeks ago

Calendar block showing title tooltip for 'Monday'

#1 @sabernhardt
2 weeks ago

  • Description modified (diff)

#2 @audrasjb
2 weeks ago

  • Milestone changed from Awaiting Review to 6.8
  • Owner set to audrasjb
  • Status changed from new to accepted

Indeed, and the easier way to replace it would probably be to use an aria-label instead of title.

I wouldn't go with an <abbr> element as it is known it adds more harm than good for assistive technologies users.

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


2 weeks ago
#3

  • Keywords has-patch added

@mukesh27 commented on PR #8189:


2 weeks ago
#4

The change look good.

https://github.com/user-attachments/assets/abdd9d87-d0e3-4f6c-9fa4-8f07902d4b16

#5 @shailu25
2 weeks ago

Test Report

Description: This Report validates the indicated patch works as expected.

PR Tested: https://github.com/WordPress/wordpress-develop/pull/8189

Environment

WordPress: 6.8-alpha-59702
PHP: 8.2.12
Browser: Firefox
OS: Windows
Theme: Twenty Twenty-Five
Plugins: None

Actual Results

  • Issue Resolved With Patch.✅

@shailu25
2 weeks ago

Before

@shailu25
2 weeks ago

After Patch

#6 @audrasjb
13 days ago

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

In 59711:

General: Get rid of title attributes used by get_calendar().

This changeset replaces title attributes with aria-label for weekdays in get_calendar() table cells.

Props sabernhardt, audrasjb, mukesh27, shailu25.
Fixes #62860.
See #24766.

Note: See TracTickets for help on using tickets.