WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 2 weeks ago

#50093 new defect (bug)

Remove the wp.a11y jQuery version file

Reported by: afercia Owned by:
Milestone: 5.6 Priority: normal
Severity: normal Version: 5.3
Component: Administration Keywords: has-patch
Focuses: javascript Cc:

Description

The jQuery version of wp-a11y is no longer used since https://core.trac.wordpress.org/changeset/46179

To my understanding, this old script is no longer registered (replaced by the new version from the packages) but the physical file is still there at src/js/_enqueues/wp/a11y.js. Not sure why the physical file was kept. I guess it can be removed safely?

Attachments (2)

50093.diff (31.6 KB) - added by audrasjb 3 months ago.
Remove a11y/js from JS dependencies
50093.1.diff (2.9 KB) - added by audrasjb 3 months ago.
Scripts/loader: remove a11y.js dependancy since it is now loaded in the new a11y package.

Download all attachments as: .zip

Change History (11)

@audrasjb
3 months ago

Remove a11y/js from JS dependencies

#1 @audrasjb
3 months ago

  • Keywords has-patch dev-feedback 2nd-opinion added

Hi,

In 50093.diff, I tried to remove this dependencies (I also updated the removed files function and some inline docs).

However, it looks like it will eventually cause some unit tests to fail:
https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/dependencies/scripts.php#L729

Should I replace wp-a11y deps with another random one in this unit test?

#2 @afercia
3 months ago

@audrasjb the various dependencies are used by the new a11y package. That part shouldn't be touched :) I think only the old physical file needs to be removed.

#3 @audrasjb
3 months ago

  • Keywords needs-refresh added; dev-feedback 2nd-opinion removed

Ahhh… 🤦‍♂️ ok, got it.

@audrasjb
3 months ago

Scripts/loader: remove a11y.js dependancy since it is now loaded in the new a11y package.

#4 @audrasjb
3 months ago

  • Keywords needs-refresh removed

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


4 weeks ago

#6 @youknowriad
4 weeks ago

I've been told that we can remove files from Core for backward compatibility as plugins could reference them directly. I'd be personally in favor of removing and if it's something we're allowed to do, I think we should consider simplifyng the placement of all the JS files in Core later.

#7 @davidbaumwald
2 weeks ago

@audrasjb @afercia, is this still something that is doable in 5.5 with the time remaining?

#8 @afercia
2 weeks ago

  • Milestone changed from 5.5 to 5.6

I'd say it's safer to to at the beginning of the next release cycle.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


2 weeks ago

Note: See TracTickets for help on using tickets.