[wp-trac] [WordPress Trac] #31517: Customizer: show a notice after attempting to navigate to external links in live previews
WordPress Trac
noreply at wordpress.org
Sat Oct 8 15:28:42 UTC 2016
#31517: Customizer: show a notice after attempting to navigate to external links in
live previews
-------------------------------------+-----------------------------
Reporter: designsimply | Owner: westonruter
Type: enhancement | Status: accepted
Priority: normal | Milestone: 4.7
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: ui, javascript
-------------------------------------+-----------------------------
Changes (by westonruter):
* keywords: => has-patch needs-testing
* owner: => westonruter
* status: new => accepted
* milestone: Future Release => 4.7
Old description:
> The Customizer only allows you to click internal, front-end links within
> a preview to navigate to URLs you can customize:
> https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/customize-
> controls.js#L2110
>
> Clicking on an external link from the live preview pane fails silently.
> To help avoid confusion, we could display a notice to alert when someone
> clicks on an external link in a live preview:
>
> > ⚠ You can only preview internal, front-end links in the customizer.
>
> Here is a past description of how a customizer notice could work from
> @westonruter: https://core.trac.wordpress.org/ticket/30677#comment:7
> (different use case, but the part about how the alert might work is
> relevant)
>
> #29098 provides a general mechanism for sending back error
> codes/messages.
New description:
The Customizer only allows you to click internal, front-end links within a
preview to navigate to URLs you can customize:
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/customize-
controls.js#L2110
Clicking on an external link from the live preview pane fails silently. To
help avoid confusion, we could display a notice to alert when someone
clicks on an external link in a live preview:
> You can only preview internal, front-end links in the customizer.
Here is a past description of how a customizer notice could work from
@westonruter: https://core.trac.wordpress.org/ticket/30677#comment:7
(different use case, but the part about how the alert might work is
relevant)
#29098 provides a general mechanism for sending back error codes/messages.
--
Comment:
This has been implemented in the patch for #30937.
When a link is not previewable it will get a `cursor:not-allowed` style
and `wp.a11y.speak()` will be called to accessibly notify that it cannot
be live previewed. Likewise, when attempting to submit a form that is not
live-previewable (if it uses a `POST` method or has an `action` that
points off of the site) there will be be the same `cursor:not-allowed`
style added to the `form` and all of its `inputs` with a similar non-
previewable message output via `wp.a11y.speak()`.
Please test: `grunt patch:https://github.com/xwp/wordpress-
develop/pull/161`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31517#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list