The WooCommerce development team has forked select2 to create a more accessible, drop-in replacement library called selectWoo. select2 is a widely used jQuery-based library for making custom drop down menus. Many users are wondering if the project has been abandoned, because the repository hasn’t seen any activity since February and 115 pull requests have piled up.
In the interest of fixing some long-standing accessibility issues with the library, WooCommerce opted to fork it and has merged in some of the PRs that were submitted to the original project. SelectWoo is backwards-compatible and can be used the same way as select2 by simply replacing the select2.js file. It has been optimized for WordPress plugin development and can optionally be initialized with .selectWoo() in order to run alongside other versions of select2 that may be used by other plugins on the site.
SelectWoo makes many improvements for those who are using screen readers, but it needs more accessibility testing. Beta 1 is availabe on GitHub. The WooCommerce team has even created a testing page with different example pages so those using screen-reading software can easily test for bugs.
Forking is usually a last resort scenario for extending popular open source libraries, but the WooCommerce team wanted the flexibility of improving the project on their own timeline. One concerned developer asked the team what will happen in the future if select2 gets back on track and why they didn’t just submit pull requests to the select2 repository.
“With a fork we can at least get things merged in to meet our own schedule, rather than waiting/relying on others or running custom versions,” WooCommerce lead developer Mike Jolley said. “There are other benefits, too, such as allowing our version to be namespaced to avoid conflicts in WP admin. The fork is public. Our changes can be merged back, when/if the project picks up again.”
Both WordPress and Drupal core contributors have been working to address accessibility issues in select2 since 2015 when the WP Accessibility Team performed extensive testing on the library to see if it was fit for use in core. Some initial planning work happened but work on these issues stalled out as select2’s maintainers became unavailable.
“I’d do it with PRs if I thought they would get merged in, but I doubt they will,” WooCommerce developer Claudiu Lodromanean said. “There’s been no action in this repo in about six months and the fork contains some PRs that have been waiting to get merged here for a very long time.”
Forking a project can needlessly fragment its contributors by causing them to have to choose one or the other, especially as the projects diverge down the line. Motivated contributors may submit multiple PRs across both projects for improvements but most will simply contribute back to the project they use. Select2’s maintainers have not published any news about why the project has gone dormant.
“There are over 100 PRs in the select2 repo unmerged,” Jolley said in response to commenters asking about the necessity of the fork. “Some of these we actually need, so with the fork we’re free to merge these as needed. The accessibility issues are hurting users today, so we cannot really afford to wait.”