-
Notifications
You must be signed in to change notification settings - Fork 382
Description
AMP validation error notices are concerning to non-technical users:
Rejection of validation errors should be limited to higher-privileged users, with Authors and Contributors (or other non-Admin role) shown validation errors warnings that just prompt them either to remove the invalid block (#2285) or to escalate the error to an administrator for support.
There should perhaps be a filter to configure the verbosity of the warnings for authors. There's a tough balance here because at one hand the warnings could be hidden to not concern users, but then at the same time the errors mean that markup is being removed. So if the validation error notice is not presented to the user, there needs to be a way for those validation errors to be escalated to an administrator.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Whether developer tools are disabled should no longer be determined by the template mode. Developer tools should be able to be enabled in Reader mode the same way as they are in Transitional/Standard modes.
- A new user preference (exposed on the profile screen) should be exposed for whether developer tools are enabled. (This may also be exposed in the wizard per Wizard step: Asking user if they're technical #4705.)
- Only administrators have access to the developer tools, although this should be gated behind a new
amp_validatecapability which by default is mapped by themanage_optionscapability (in the same way ascustomizeis by default granted byedit_theme_options). - When developer tools are turned off, the validation screens are not displayed in the admin menu (although they can still be accessed by users who can
amp_validate). - When developer tools are turned off, synchronous validation is not performed in the editor when saving a post. Instead, saving a published post should schedule an event to validate that URL. (To be done as part of Use WP Cron to periodically check site URLs for AMP validation #1756.)
- When there are unreviewed validation errors, a Site Health test should be make this known. See Use WP Cron to periodically check site URLs for AMP validation #1756 (comment).
