+44 0330 223 3428
Call Us
+44 0330 223 3428

WPTavern: WooCommerce Forks select2, Releases selectWoo as a Drop-In Replacement with Improved Accessibility

WPTavern: WooCommerce Forks select2, Releases selectWoo as a Drop-In Replacement with Improved Accessibility

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.”



Source: WordPress

Related Post
Matt: On React and WordPress

Matt: On React and WordPress Big companies like to bury unpleasant news on Fridays: A few weeks ago, Facebook announced they have decided to dig in on their patent clause addition to the React license, even after Apache had said it’s no longer allowed for Apache.org projects. In their words, removing the patent clause would […]

Read more
WPTavern: First WordCamp Dublin Set for October 14-15

WPTavern: First WordCamp Dublin Set for October 14-15 photo credit: Ireland.com Following up on the success of WordCamp Belfast last October, the WordPress community in Dublin will be hosting its first WordCamp October 14-15. Both camps began the early stages of planning last year and the two communities have shared some of the same organizers […]

Read more
WPTavern: GitHub Partners with Facebook to Release Atom-IDE

WPTavern: GitHub Partners with Facebook to Release Atom-IDE GitHub announced the launch of Atom-IDE this week, a new set of packages that extend its open source JavaScript-powered code editor to include IDE-like functionality. This first release includes packages that support TypeScript, Flow, JavaScript, Java, C#, and PHP. “The start of this journey includes smarter context-aware […]

Read more

Leave a Reply

Your email address will not be published.