Make WordPress Core

Opened 3 years ago

Last modified 3 weeks ago

#53157 accepted enhancement

Replace table tags for color palettes on user profile screen

Reported by: sabernhardt's profile sabernhardt Owned by: joedolson's profile joedolson
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: accessibility, css, administration Cc:

Description

To avoid the semantics of tables, the color palettes' table tags can be replaced with generic div tags.

Attachments (1)

53157.diff (1.8 KB) - added by sabernhardt 3 years ago.

Download all attachments as: .zip

Change History (6)

@sabernhardt
3 years ago

#1 @desrosj
3 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release

This seems like it would be fine. I can't think of any backwards compatibility issues here unless someone is targeting the color palette tables to style them differently. But I think that's a long shot.

Moving to Future Release for now and can revisit after FSE in 5.8.

#2 @joedolson
6 weeks ago

  • Focuses accessibility added
  • Milestone changed from Future Release to 6.5
  • Owner set to joedolson
  • Status changed from new to accepted

At minimum, these should have role="presentation", but I can't see any good reason not to replace these. This is also an accessibility issue, since it's a misrepresentation of the information in tabular format, though that's relatively minor.

#3 @sabernhardt
6 weeks ago

  • Keywords needs-refresh added

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


3 weeks ago
#4

  • Keywords needs-refresh removed
  • Replaces table elements.
  • Adds a .color-palette-shade class to the inner div elements.
  • Updates styles to fit the new elements.

Trac 53157

#5 @sabernhardt
3 weeks ago

Of the plugins that target the `.color-palette` class, a few include table or td elements. However, among the plugins I was able to check, the change seems to have few/minor effects.

  1. WP Dark Mode would need to update the script that targets the table for its color adjustments.
  2. Hide My WP Ghost has a copy of core styles and scripts for the login page. If the plugin also enqueues those copies within the admin, the files would require updating.
Note: See TracTickets for help on using tickets.