WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 3 weeks ago

#32399 accepted enhancement

List table: Lists of items should inform users about the "current view" being displayed

Reported by: afercia Owned by: joedolson
Milestone: 4.8.1 Priority: normal
Severity: normal Version:
Component: Administration Keywords: needs-patch
Focuses: ui, accessibility Cc:

Description

See related #32147

Several screens in the admin present items in a list and you can filter these lists choosing which "view" you want, whether they're Posts in a List Table or lists generated by other components (see Themes and Plugins), they all have some "views" links.

When you select a view, there's no clear, semantic, indication in the markup about the current view being displayed. There's just some bold text.

Users, especially the ones who use assistive technologies, would need some feedback about which kind of "view" they're currently in. For example, something like you're currently viewing the Scheduled Posts. Of course this is the semantics that should be conveyed, not the best possible phrasing.

There are ways to do this but the main issue would be about translatable strings, as pointed out in #32147.

Any thoughts and patches more than welcome :)

Screenshot for reference:

https://cldup.com/KE9MdelYnE.png

Attachments (1)

32399.patch (824 bytes) - added by joedolson 2 years ago.
Adds context to heading for view and page in post views.

Download all attachments as: .zip

Change History (21)

#1 follow-up: @joedolson
2 years ago

It seems to me like the data should be pushed into the heading for the page. E.g., click 'Scheduled', heading changes from 'Posts' to 'Scheduled Posts'. That would be simple, uncluttered, and semantic.

#2 @joedolson
2 years ago

Attached patch only applies to post & post types, as an example of getting that data into the heading.

It also shows up an issue with the language used for post statuses; they aren't consistent - e.g. "Scheduled" vs. "Trash". This is evident when used in a construction: Scheduled Posts is totally logical, but "Trash Posts" doesn't make so much sense.

@joedolson
2 years ago

Adds context to heading for view and page in post views.

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


2 years ago

#4 @joedolson
2 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.3
  • Summary changed from Lists of items should inform users about the "current view" being displayed to List table: Lists of items should inform users about the "current view" being displayed

#5 in reply to: ↑ 1 @afercia
2 years ago

Replying to joedolson:

It seems to me like the data should be pushed into the heading for the page.

That would be ideal. Especially now that the main heading is going to be changed in a H1 see #31650
For Posts (Custom Post Types, Pages) we could simply extend the labels provided by register_post_status() in order to have fully translatable strings e.g.:

register_post_status( 'publish', array(
	'label'       => _x( 'Published', 'post' ),
	'h1'          => __( 'Published Posts' ),
	...

Other screens, e.g. Users, Themes, Plugins, would require something different but definitely worth considering this and I'd highly recommend contextual, descriptive, headings.

#6 @joedolson
2 years ago

I don't think we want to push complex strings into the strings registered in a post type; I'd rather see linguistic ur-types, such as:

register_post_status( 'publish', array(
	'label'     => _x( 'Published', 'post' ),
	'adjective' => __( 'Published' ),
	'verb'      => __( 'Publish' ),
	...

This allows us to create any needed string combination, rather than making something that's *only* usable in specific contexts.

#7 @joedolson
2 years ago

We might be able to make a case for adding this information to the status messages block.

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


2 years ago

#9 @johnbillion
2 years ago

  • Keywords needs-patch added; has-patch removed
  • Type changed from defect (bug) to enhancement
  • Version 4.2 deleted

Adding stand-alone adjectives/verbs/etc as individual labels is a non-starter because it's impossible to localise these.

We can get around it by using phrases which aren't specific to the post type, such as "Status: Published" instead of "Published Posts". This is also more inline with the sort of phrases you'd expect to see when filtering lists of records.

#10 @afercia
2 years ago

Yup or see an alternate approach suggested by @ocean90 here:
https://wordpress.slack.com/archives/accessibility/p1433185516000481

#11 @obenland
2 years ago

Beta is going to hit in two weeks. Does this ticket have a realistic chance to get in until then?

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


2 years ago

This ticket was mentioned in Slack in #core by helen. View the logs.


2 years ago

#14 @obenland
2 years ago

  • Milestone changed from 4.3 to Future Release

Not a lot of movement recently, let's look at it again in a future release.

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


22 months ago

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


7 months ago

#17 @joedolson
7 months ago

  • Milestone changed from Future Release to 4.8
  • Owner set to joedolson
  • Status changed from new to accepted

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


7 weeks ago

#19 @jbpaul17
7 weeks ago

  • Milestone changed from 4.8 to 4.8.1

Punting to 4.8.1 as there doesn't appear to be a patch coming shortly. If one is ready, then we can pull back into 4.8.

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


3 weeks ago

Note: See TracTickets for help on using tickets.