refactor: extract skip_link to shared ShopComponents module

Move the accessibility skip link from ThemeLive.PreviewPages to the
shared ShopComponents module for reuse on public storefront pages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 13:51:15 +00:00
parent 5f3efebdfc
commit 0e998fdac9
9 changed files with 21 additions and 17 deletions

View File

@@ -38,4 +38,18 @@ defmodule SimpleshopThemeWeb.ShopComponents do
</div>
"""
end
@doc """
Renders the skip link for keyboard navigation accessibility.
This is a standard accessibility pattern that allows keyboard users
to skip directly to the main content.
"""
def skip_link(assigns) do
~H"""
<a href="#main-content" class="skip-link">
Skip to main content
</a>
"""
end
end