Opened 7 weeks ago
Last modified 5 weeks ago
#64015 new defect (bug)
Reconsider removal of import map polyfill
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | Script Loader | Keywords: | |
| Focuses: | javascript | Cc: |
Description
The import map polyfill was removed in r58952, on the basis that the browser support Matrix for WordPress doesn't include any browsers that don't support import map.
However, the interactivity API uses import maps, and is rendered on the front-end. This means that removing the import map polyfill breaks anything that uses the interactivity API on the front end: navigation menus, the new accordion block, etc.
Historically, our policies on front-end support have been different from those for admin support. I think it's entirely reasonable to remove the polyfill in the admin, but it is a potentially significant problem for site owners, impacting their users.
There are multiple cases of user reports of being unable to use features due to their having older devices.
See: #63968, https://github.com/WordPress/gutenberg/issues/71431, #62641, #62533, https://github.com/WordPress/gutenberg/issues/68641
There may be more; this is what I found.
In my opinion, keeping import map polyfilled so that usage of the Interactivity API isn't discouraged on sites that need better support is important. This covers a wide variety of economically disadvantaged populations, including people with disabilities.
Pinging @swissspidy @desrosj @luisherranz @gziolo as people involved in #60970.
At the moment I'm putting this in the Bundled Theme component, as that's where the problem is exhibited, although it's not explicitly a problem with a theme. Not sure what would be most appropriate there.
Change History (2)
#2
@
5 weeks ago
For this particular case, these few reports all seem to be related to iOS. Import maps are supported since Safari 16.4+ / iOS 16.4+ (released in 2023), which is available for iPhone 8 or newer (released in 2017). So by removing the polyfill we still support 8-year old devices. I think that's very reasonable.
Also noting that the usage of Safari < 16.4 on iOS is 1.3%, down from 3.6% when the polyfill was removed ~1 year ago.
Historically, our policies on front-end support have been different from those for admin support.
Any documentation on that? In that case I would encourage a more general discussion about frontend vs backend browser suppport and documenting any decisions at https://make.wordpress.org/core/handbook/best-practices/browser-support/ and enforcing the policy accordingly through separate browserslist configs etc.
The component probably could be Interactivity API or Themes too, but I'll set it to "Script Loader" to match #60970.