ClassicPress / ClassicPress-v2

NOT READY FOR PRODUCTION.
GNU General Public License v2.0
13 stars 4 forks source link

Rebuild widgets screen (and equivalent in Customizer) to use details and summary tags #224

Closed KTS915 closed 1 year ago

KTS915 commented 1 year ago

Context

For greater accessibility (and significantly less reliance on JavaScript), half of the menu screen has already been rebuilt using details and summary tags. A PR will also soon be merged that rebuilds the admin dashboard and post screen metaboxes using details and summary 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:

Possible Solution

What still needs to be done:

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

KTS915 commented 1 year ago

Now found and changed the errant div to a li.

KTS915 commented 1 year ago

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.

KTS915 commented 1 year ago

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.

KTS915 commented 1 year ago

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.

mattyrob commented 1 year ago

Completed with #240