Last 12 weeks · 13 commits
3 of 6 standards met
Repository: vercel/swr-site. Description: The official website for SWR. Stars: 505, Forks: 353. Primary language: MDX. Languages: MDX (73%), TypeScript (26.7%), CSS (0.3%), JavaScript (0%). License: Apache-2.0. Homepage: https://swr.vercel.app Open PRs: 32, open issues: 81. Last activity: 2w ago. Community health: 75%. Top contributors: shuding, koba04, huozhi, huzhengen, pacocoursey, vassbence, dependabot[bot], valentinpolitov, leodr, guilherssousa and others.
Adds a short note that functional optimisticData receives (currentData, displayedData), matching vercel/swr#2668.\n\nCloses #510.
Description [ ] Adding new page [ ] Updating existing documentation [x] Other updates This PR fixes two accessibility violations identified by IBM Equal Access Checker: RSS button missing accessible name (a_text_purpose violation) Theme toggle button missing label (input_label_exists violation) These violations affect users relying on assistive technologies like screen readers, as the buttons lack proper labels to convey their purpose. Issue Description When running IBM Accessibility Checker (Version 4.0.9) on the website, 2 accessibility violations were reported. 1) RSS button missing accessible name (a_text_purpose violation) Why is this important? When the purpose of a link is clear users can easily navigate links on the page without having to see the surrounding information for context. 2) Theme toggle button missing label (input_label_exists violation) Why is this important? Associating a meaningful label with every UI control allows the browser and assistive technology to expose and announce the control to a user. Associating a visible label also provides a larger clickable area. Fix Description RSS Button () Added to provide an accessible name for the link Added to provide a tooltip for mouse users The RSS icon already has proper ARIA markup and remains unchanged Theme Toggle () Added to the loading state button Added dynamic to the interactive button that updates based on current theme: "Switch to light mode" when in dark mode "Switch to dark mode" when in light mode This provides clear context about what action the button will perform Screenshot of Patched Website The patch submitted in this PR was generated by A11YRepair, an automated Web Accessibility repair tool that I developed to address common accessibility violations in web applications. The generated fixes were manually reviewed and validated before submission. WCAG Compliance These changes address the following WCAG Success Criteria: 2.4.4 Link Purpose (In Context) - Level A 4.1.2 Name, Role, Value - Level A
Description This PR fixes an issue where top-level redirects were not fully locale-aware. The site uses an i18n routing structure where the default locale does not have a URL prefix (e.g. ), while non-default locales do (e.g. ). However, the existing redirect rules only covered non-prefixed routes, which caused 404 pages when navigating the site in non-default languages via the header links or the "Get Started" CTA. Since Next.js redirects are not locale-aware by default, both route patterns must be handled explicitly. What was fixed Redirect rules were updated to explicitly support both: Default locale routes (e.g. , , ) Locale-prefixed routes (e.g. , , ) This ensures consistent navigation behavior across all supported languages. Redirect behavior → → → → → → Why this change is needed The issue only affects non-default locales, making it easy to miss during development. It breaks primary navigation and CTAs for localized users. The fix aligns with Next.js i18n routing behavior and avoids implicit assumptions about locales. Checklist [ ] Adding new page [ ] Updating existing documentation [x] Other updates (routing / redirect fix) Note: This description was written with AI assistance. Please feel free to suggest wording improvements if anything sounds unnatural.