Open karlgroves opened 5 years ago
Screenshot from full report:
Not sure if there's a technical reason for the JS alert in the first place. This behavior has always been a bit annoying and may be completely unexpected for some users.
If an user confirmation is necessary for some technical reason (can't think of any off the top of my head), would be great to explore an alternative solution that doesn't change context unexpectedly.
Related to #12023.
Unfortunately, it appears to be somewhat of a Core bug due to WP not being able to save the state "Private" on a draft post. I'm not entirely clear about whether the alert box is a Gutenberg issue or also appeared in Classic editor so leaving this issue open for now.
Let's see if work can be done on #12023 to help resolve this.
I'm not entirely clear about whether the alert box is a Gutenberg issue or also appeared in Classic editor
No alert appears in the Classic Editor, I guess simply because the setting is saved when submitting the form.
This is an instance of underlying technical limitations driving a sub-optimal design. See also #9396 for extensive discussion. The approach in #12023 shows promise from both a design and accessibility perspective; let's see if we can't help move it along. 🚀
Is it viable to add a new post status that's more similar to 'future', but indicates that the post will be private when published? E.g., implement status variants such as future-private, draft-private, etc.? These could be stored internally as post meta, and processed at publication to set the status as well as display the expected status in the editor.
Advantages: no need to change anything about post statuses, ability to process autosaving with awareness of a status change but without implementing the change.
Radio button automatically changes the context on user focus
Issue description
Under the "Visibility" section of the Publish panel, there are three radio buttons named "Public", "Private" and "Password". When the user selects the "Private" option, an alert appears asking if they want to publish the post privately, and clicking "Yes" then publishes the post immediately. This behaviour is not consistent with the expected behaviour of radio controls, and is not consistent with the behavior of the other two radios in that group.
Additionally, if the user clicks "No" in the alert, the focus is shifted to the "Public" radio control, rather than shifting back to the "Private" radio as would be expected.
Remediation Guidance
Remove the alert-and-publish behaviour from the "Private" radio, so that it behaves like a standard radio control. This will also resolve the focus management issue.
Relevant standards
Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-16 in Tenon's report