Closed KTS915 closed 1 year ago
Now found and changed the errant div
to a li
.
Current state of play is that the widgets now work in the Customizer as expected, except that they do not expose their contents beyond the Remove and Done buttons after a page reload. (The contents are fully shown when a widget is first added to the sidebar panel.)
Interestingly, all the core widgets behave the same, presumably because the Customizer is in JS and so is whatever is causing the problems on the old-school widgets page.
The core Audio, Image, Gallery, and Video widgets now work. EDIT: Now ALL the core widgets work properly on the admin page. Still have work to do on the Customizer, where they work after initially added, but not when the page is (re-)loaded.
I have it all working now, EXCEPT that, after testing the behavior of orphaned widgets by changing themes, I ended up with a very long list of widgets on the Inactive Widgets sidebar, while the CSS for the Custom HTML widget has got messed up, even after going back to the original theme and re-loading the page.
Completed with #240
Context
For greater accessibility (and significantly less reliance on JavaScript), half of the menu screen has already been rebuilt using
details
andsummary
tags. A PR will also soon be merged that rebuilds the admin dashboard and post screen metaboxes usingdetails
andsummary
tags.The logical next step is to re-build the widgets screen in the same manner. I have begun this task in a branch of my CP v2 fork at https://github.com/KTS915/ClassicPress-v2/tree/widgets
I am creating this issue partly to track progress and partly to invite help.
Implementation So Far
What I have done so far is as follows:
details
andsummary
tags.details
andsummary
tags.Possible Solution
What still needs to be done:
div
that needs changing to aul
, but I haven't found where yet, and~ thedetails
tags need to be made to open and close properly. (Seesrc/wp-admin/js/customize-widgets.js
.)~src/wp-admin/js/widgets/text-widgets.js
.~media-widgets.js
file (insrc/wp-admin/js/widgets
) and I have already made the same edits to that file that I made to get the Custom HTML widget working, but they also need work on their own JS files (also insrc/wp-admin/js/widgets
).~Will you be able to help with the implementation?
I have already started working on this at https://github.com/KTS915/ClassicPress-v2/tree/widgets