cagov / design-system

State of California Design System
MIT License
79 stars 25 forks source link

Fix ip dependency #1014

Closed xjensen closed 6 months ago

xjensen commented 6 months ago

This PR addresses the npm ip vulnerability in a somewhat creative way.

It turns out all of the package-lock.json files across components are redundant. This has been the case since we implemented an npm workspaces setup in this repo. Also, because package-lock.json is generally not published within npm packages, we don't need to worry about missing anything downstream.

So, this PR simply deletes all of those package-lock.json files. Rebuilds and version updates are also included.

I can publish new versions of all the packages when we're agreed on the approach here.

github-actions[bot] commented 6 months ago

Preview site available at fix-ip.pr.designsystem.webstandards.ca.gov.

xjensen commented 6 months ago

Accessibility tests are failing. Need to fix the pagination component.

xjensen commented 6 months ago

We now have a tentative fix for the pagination accessibility problem.

In the pagination component, we have an ellipsis that denotes "overflow" when there are too many pages.

Screenshot 2024-02-27 at 09 43 14

For accessibility purposes, we've been applying role="presentation" to this ellipsis. But it seems newer versions of accessibility testers don't like this. By rule, a list should only contain active <li> elements and nothing else.

So instead, I've replaced that role with an aria-label that describes the range represented by the ellipsis. For example, aria-label="Page 2…4" (where "Page" is currently a templated word for translation purposes). This felt like a good stop-gap fix for now. I'm definitively open to suggestions. There are many ways to approach this.