This repository has been archived by the owner on Mar 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild widgets screen (and in Customizer) to use modern HTML (#240)
* Update widgets.php to use `details` and `summary` tags This significantly improves accessibility while also updating the admin to use HTML5 and less JavaScript. * Update widgets-form.php * Update class-wp-customize-widgets.php to work with `details` and `summary` elements * Update customize-widgets.js to work with more semantic markup * Update media-widgets.js Enables all the media widgets (image, audio, video, etc) to work with more semantic markup and the `details` and `summary` elements. * Update text-widgets.js to work with more semantic markup * Update custom-html-widgets.js to work with more semantic markup * Update widgets.js to work with `details` and `summary` elements and more semantic markup * Update widgets.css so that changes to markup cause minimal visual differences. * Update widgets.js to ensure chooser reamins available after dragging a widget * Update widgets.js to ensure that `inert` attribute on widget contents is removed after dragging to sidebar. * Update widgets.js to increment each new added widget's ID. * Update widgets.js to ensure widget opens when added to sidebar. * Update widgets.css to ensure available widgets sidebar description is visible. * Update widgets.php to improve semantics of receiving sidebar * Update widgets.js to have receiving sidebars open and close when widget dragged over or off them. * Update customize-controls.css * Update customize-widgets.css * Update customize-widgets.css to ensure summary marker does not show in Safari * Update widgets.css to enable custom `summary` marker * Update widgets.php to reinstate `<h3>` header after feedback on dashboard widgets PR * Update widgets.css to create custom markers for lists of widget * Update widgets.php to reinstate `<h2>` headers * Update widgets-form.php to reinstate `<h2>` headers * Update widgets.css to account for reinstatement of `<h2>` headers * Update widgets.css to maintain marker spacing * Update widgets.css * PHP Coding Standards * PHPUnit fixes * JSHint fixes * Update widgets.js to address error message in console * Update media-widgets.js to make widget open when added to sidebar * Update widgets.css to use native disclosure widget marker, but enlarged I have just read an article by Scott O'Hara (https://www.scottohara.me/blog/2022/09/12/details-summary.html), where he says that removing the native marker for the disclosure widget can cause accessibility problems because some assistive technology looks to the marker instead of the status of the `open` attribute to know whether the widget is open or not! Yes, it's completely crazy! So this commit goes back to using the native marker but makes it bigger. Which, really, I suppose is what I should have done in the first place. I will submit a PR to make a similar change for the dashboard widgets, post metaboxes, and menu items that we've already included. --------- Co-authored-by: mattyrob <[email protected]>
- Loading branch information
Showing
13 changed files
with
268 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.