Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#40986 closed defect (bug) (fixed)

Widgets: text widget and media widgets cannot be edited in accessibility mode

Reported by: designsimply's profile designsimply Owned by: westonruter's profile westonruter
Milestone: 4.8.1 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch fixed-major commit
Focuses: accessibility Cc:

Description (last modified by designsimply)

Steps to reproduce:

  1. Go to WP-Admin ->Appearance ->Widgets.
  2. Add a text widget to any widget area and add some content.
  3. Click on Screen Options at the top of the page and enable Accessibility Mode.
  4. Attempt to edit the widget.

Result: there were options to move the widget to different widget areas, but no option to edit the widget itself. The following error appears in the console:

TypeError: b is not a constructor
tinymce.min.js:13:11887

Video: 1m9s


Seen at http://alittletestblog.com/wp-admin/widgets.php?editwidget=text-3&sidebar=sidebar-1&key=0 using Firefox 53.0.3 on Mac OS X 10.12.5 on a site running WordPress 4.9-alpha-40885.

/hat tip @kokkieh for reporting the issue.

Attachments (2)

Screen Shot 2017-06-09 at Fri Jun 9 2.35.14 PM.png (203.9 KB) - added by designsimply 8 years ago.
40986.0.diff (13.2 KB) - added by westonruter 7 years ago.
https://github.com/xwp/wordpress-develop/pull/234

Download all attachments as: .zip

Change History (17)

#1 @designsimply
8 years ago

  • Description modified (diff)

#2 @designsimply
8 years ago

  • Description modified (diff)

#3 @afercia
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.8.1
  • Version set to 4.8

Can confirm 😞 Regression from 4.7. See below how the previous text widget looked like in the accessibility mode in WP 4.7:

https://cldup.com/HxnHGEBhW7.png

Last edited 7 years ago by afercia (previous) (diff)

#4 @westonruter
7 years ago

  • Summary changed from Widgets: text widget cannot be edited in accessibility mode to Widgets: text widget and media widgets cannot be edited in accessibility mode

It's also a problem for the media widgets (image, video, audio)

I don't, however, get any JS error.

#5 @westonruter
7 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

@afercia @designsimply please give 40986.0.diff a try. It should fix the Text widget and Media widgets so that they work on the widgets admin screen in accessibility mode, while also working without the mode and also working in the customizer.

#6 @afercia
7 years ago

@westonruter looks good to me, tested a bit also on Windows IE 11 👍
About $( window ).load() shouldn't that just be changed to on()? See for example #25371.

#7 @afercia
7 years ago

Looking a bit into the history of the Widgets screen "accessibility mode", it was introduced in [11503] and it's basically the no-js fallback of this screen. All the "classical" widgets can be edited also when JS is off, while the new ones are JS-based.
When the "accessibility mode" is on, the main widgets JavaScript file doesn't get enqueued and the Widgets screen is fully functional, it just works without the JS enhancement. So I'm wondering what the no-js fallback should be for the new widgets: they can still be repositioned but there's no way to edit their content. Should a no-js fallback be provided in the first place? Should the new widgets be hidden when no-js? Should a warning appear? Or...? From a more general perspective, is WordPress still aiming to provide no-js fallbacks in a future where many UI components will be built with JS?

#8 @westonruter
7 years ago

I think a no-JS fallback should be considered passé.

#9 @westonruter
7 years ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 40941:

Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).

Amends [40640], [40631].
Props westonruter, afercia.
See #35243, #32417.
Fixes #40986.

#10 @westonruter
7 years ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 4.8.1.

#11 @afercia
7 years ago

I think a no-JS fallback should be considered passé.

I tend to agree, however I think WordPress should consider to announce publicly that from now on a no-js fallback is not guaranteed, as this is a big shift from the development practices adopted in the last years.

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


7 years ago

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


7 years ago

#14 @westonruter
7 years ago

  • Keywords commit added; needs-testing removed

#15 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 41051:

Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).

Merges [40941] to 4.8 branch.
Amends [40640], [40631].
Props westonruter, afercia.
See #35243, #32417.
Fixes #40986 for 4.8.1.

Note: See TracTickets for help on using tickets.