WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 10 months ago

#31416 new defect (bug)

An accessibility issue with the Publish metabox

Reported by: basbva Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.1.1
Component: Posts, Post Types Keywords: needs-patch
Focuses: ui, javascript, administration Cc:
PR Number:

Description

Taking a closer look at the Publish metabox for posts I realise that it has what I would call a bug. Take a look at the image attached. It tells me a post is published, while it's still asking for confirmation to be published. This screen shows up when first a post is set to private -and so gets published privately- and next is set to public, without hitting the 'Publish' button.

The post is actually published privately, which should show up as it's status, as it normally does. It tells me though it's published (which impies it should be published publicly).

I stumbled upon this, while I was searching for a more intiutive solution for inexperienced posters on one of my sites to post privately. I found two threads in forums which adress this issue:

https://wordpress.org/support/topic/how-to-set-new-post-visibility-to-private-by-default?replies=14

http://wordpress.stackexchange.com/questions/118970/set-posts-of-a-custom-post-type-to-be-private-by-default

Neither of threads mention (or seem to be aware?) of this shortcoming, while both try to solve the same issue I'm having. I question whether this problem can be solved, while the Publish metabox has such shortcomings.

I hope that by fixing this little bug, it might actually be possible to create a more accessisble Publish metabox for guests on a site, maybe by a hack or plugin, but preferably within the WP core files.

http://www.basbva.nl/wp-content/uploads/2015/02/publish-metabox-bug.jpg

Attachments (2)

publish metabox bug?.jpg (19.8 KB) - added by basbva 5 years ago.
meta-boxes.php (46.6 KB) - added by basbva 5 years ago.
meta-boxes.php / a private approach

Download all attachments as: .zip

Change History (12)

#1 @DrewAPicture
5 years ago

  • Focuses ui javascript added
  • Keywords needs-patch added

Confirmed. Looks like maybe need to skip toggling the Publish button text if switching from a private published post to a publish one.

#2 @DrewAPicture
5 years ago

See http://cl.ly/image/3D3m3m3B2A1E for a reproduction screencast.

#3 @basbva
5 years ago

So the status tells us it's published after hitting 'ok' in the 'visibility' screen. The notification of the post being a draft and the option to safe it as such disappeares prematurely, right?

#4 @SergeyBiryukov
5 years ago

  • Component changed from Administration to Posts, Post Types
  • Focuses administration added
  • Summary changed from An accesibility issue with the Publish metabox to An accessibility issue with the Publish metabox

#6 @basbva
5 years ago

I realise there is some inconsistency my initial post. To plead my case, I would like to state it isn't all the way clear what the publish metabox is telling us.

I would expect it to show us status and visibility of the post as is, untill I start editing those settings. As it does after publishing.

This isn't consistent from the moment we add a new post. Then we see the status and visibility as they will be the moment we have added a name to the post, as it becomes a draft. Strangely I also encountered another status that can show up after some testing. Which was the status: ' ', i.e. 'none'. See added images.

To emphasize the fact those mataboxes show either the current status of a post, or an option, should it not be clear in the first place what they're telling us, and does it not make more sense to show the status 'none' as we add a post and hide this status where it shows up now?

The 'none' status you currently see after changing the visibility settings from private to public, and after that opening the status window and cancelling it.

For newly invited edit 23 feb '15: 'not contibutors but authors', who aren't neccesariliy experienced with WP, I believe it's important to be clear how this publish box works. This starts with it being consistent.

http://www.basbva.nl/wp-content/uploads/2015/02/status-box.jpg
http://www.basbva.nl/wp-content/uploads/2015/02/status-none.jpg

Last edited 5 years ago by basbva (previous) (diff)

@basbva
5 years ago

meta-boxes.php / a private approach

#7 @basbva
5 years ago

  • Focuses accessibility added

I've added a draft of a custom workflow based on the assumption you want to discourage (not prohibit) authors to publish publicly without thinking.

To encourage them to post privately, use drafts and finally have their post reviewed before publishing. This is a work in progress, and I'm hoping to recreate the current default settings, with a number of additional adaption options so one can easily jump to other posting procedures. Let's say with incorporated setting options for private, public, password and pending post types, so others can easily figure this out for themselves. With each of those states of mind as a preferred approach.

I have to confess I'm impressed with what you can achieve within meta-boxes.php by only adding rules. It's equally unintuitive, unfortunately. Changing those rules is certainly what you don't want to be spending your time with…

A draft for an alternative meta-boxes.php for WP 4.1.1 - a private posting approach - is attached to the original post (this is not an answer on how to move on from here, it is roughly what one hopes can be achieved by working with custum post status though).

Last edited 5 years ago by basbva (previous) (diff)

#8 @basbva
5 years ago

  • Keywords reporter-feedback added

I'm looking into this issue, without any experience with php though. Not to mention javascript or SVN. So this will take some time.

Related: https://core.trac.wordpress.org/ticket/12706

Probably it is interesting to respect the current publish metabox though, even as it can do with a patch. Keeping in mind backward compatibility.

To be more specific, in metaboxes.php the following code seems to cause the issue:
<option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option>

#9 @joedolson
4 years ago

  • Focuses accessibility removed

#10 @chriscct7
10 months ago

  • Keywords reporter-feedback removed

This seems to be a legitimate pair of bugs with the classic editor.

Gutenberg implemented a custom flow for the publishing actions that avoids both of the issues about to be described.

Starting with a new, currently privately published post, setting the status of the post to be public immediately updates the UI to show it in a way suggesting the post is posted publicly. WordPress should not reflect in the text the changes until those changes are saved.

Issues displayed in video:

  1. A privately published post when the visibility is changed to public, has the text updated to reflect that it is publicly published before it is saved.
  2. When a privately published post has the visibility changed to public and the status chang dropdown active and clicks on Cancel, the status is changed to a null string.

Video: http://cloud.supportally.com/04c4b9feaa81

Note: See TracTickets for help on using tickets.