Skip to content

chore: upgrade mapbox-gl version for accessibility issues (v3.0.0)#654

Open
anguyen-yext2 wants to merge 9 commits intomainfrom
mapbox-upgrade
Open

chore: upgrade mapbox-gl version for accessibility issues (v3.0.0)#654
anguyen-yext2 wants to merge 9 commits intomainfrom
mapbox-upgrade

Conversation

@anguyen-yext2
Copy link
Contributor

@anguyen-yext2 anguyen-yext2 commented Mar 18, 2026

  • current version has some accessibility issues that will be addressed by this upgrade
  • removed unnecessary @types/mapbox-gl import since mapbox-gl provides its own types
  • replace Mapbox-owned public types in search-ui-react with library-owned, version-stable interfaces
  • replace deprecated Mapbox aliases usage

This PR also includes some improvements that I noticed when testing:

  • test-site pin popups not showing up
  • clean up the map listeners properly
  • memoizes the debounced function so it stays the same across renders unless milliseconds changes

J=WAT-5461
TEST=auto,manual

verified test-site still function as expected
verified that locator functions as expected and that there is no longer any accessibility errors on live site

current version has some accessibility issues that will be addressed by this upgrade

J=WAT-5461
TEST=manual

verified test-site still function as expected
platform testing:
1. pack the change along
2. upgrade the mapbox versions in pages-component and pack that change
3. reference those packed versions in VE and starter
4. swapped branch and confirmed there is no longer any accessibility errors on live site
@anguyen-yext2 anguyen-yext2 requested a review from a team as a code owner March 18, 2026 20:11
@k-gerner
Copy link
Contributor

Why does this require a major version upgrade?

@semgrep-code-yext
Copy link

Legal Risk

The following dependencies were released under a license that
is currently prohibited by your organization. Merging is blocked until this is resolved.

Recommendation

Reach out to your security team or Semgrep admin to address this issue. In special cases, exceptions may be made for dependencies with violating licenses, however, the general recommendation is to avoid using a dependency under such a license

non-standard

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

Current unit coverage is 89.79427188382412%
Current visual coverage is 69.46484784889822%
Current combined coverage is 92.04905063291139%

@coveralls
Copy link

coveralls commented Mar 18, 2026

Coverage Status

coverage: 84.783% (+0.2%) from 84.61%
when pulling 82d7301 on mapbox-upgrade
into 2b50142 on main.

@anguyen-yext2
Copy link
Contributor Author

Why does this require a major version upgrade?

Because our public types expose Mapbox types (mapboxgl.MapboxOptions, LngLatBounds, etc.), so consumers can see breaking type/runtime differences even though our component props didn’t change.
For example, if a consumer uses our exported OnDragHandler (bounds non-null), but Mapbox v3 can return nullable bounds in some paths, their handler assumptions can fail type checks or require code changes.
That’s why I had to change MapboxMap.tsx around getBounds() handling.
Similarly, consumers would hit TS errors when accessing e.originalEvent until they add guards like 'originalEvent' in e.

@anguyen-yext2 anguyen-yext2 changed the title chore: upgrade mapbox versions (v3.0.0) chore: upgrade mapbox-gl version for accessibility issues (v3.0.0) Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants