Skip to content

Conversation

@wo-o29
Copy link
Contributor

@wo-o29 wo-o29 commented Nov 11, 2025

📝 Key Changes

This PR fixes a bug where language switching from a 404 page causes URL path corruption in the A11y Fundamentals documentation (/a11y/ path).

Problem

When navigating through the following sequence in the A11y documentation:

  1. Visit /a11y/structure/button-inside-button.html (Korean)
  2. Switch to English (page doesn't exist → 404)
  3. Switch back to Korean
  4. Result: /a11y/y/en/structure/button-inside-button.html (corrupted path)

Solution

Added a custom click event handler in the A11y documentation's Layout.vue that intercepts language switch clicks and reconstructs the URL correctly by:

  1. Extracting the language-agnostic page path from the current URL
  2. Identifying the target language from the clicked link
  3. Reconstructing the complete path with the correct language prefix

This ensures that language switching works correctly even from 404 pages, preventing path corruption.

🖼️ Before and After Comparison

Select language : koenko

Before After
2025-11-1116-35-11-ezgif com-video-to-gif-converter 2025-11-1116-34-53-ezgif com-video-to-gif-converter

@vercel
Copy link

vercel bot commented Nov 11, 2025

@wo-o29 is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant