fix(pagination): hide mobile page label from AT tree with aria-hidden
The mobile 'Seite X von Y' span had aria-current='page', which created two elements announcing the current page on wide screens: the hidden mobile label and the active desktop button. On sm:+ screens the mobile span is display:none (removed from AT tree), but on small screens both the span and the desktop button were redundant. Replace aria-current with aria-hidden='true' on the mobile label so AT always relies on the desktop button's aria-current. Updates spec test accordingly and adds a second assertion in a broader test context (Decision Queue #1). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -95,9 +95,10 @@ const pageWindow = $derived.by(() => {
|
||||
{/if}
|
||||
|
||||
<!-- Mobile: "Seite X von Y" label (hidden on sm: and above) -->
|
||||
<!-- aria-hidden: desktop numbered buttons carry the aria-current="page" role; this label is redundant on wide screens -->
|
||||
<span
|
||||
data-testid="pagination-page-label"
|
||||
aria-current="page"
|
||||
aria-hidden="true"
|
||||
class="font-sans text-sm text-ink-2 sm:hidden"
|
||||
>
|
||||
{m.pagination_page_of({ page: page + 1, total: totalPages })}
|
||||
|
||||
Reference in New Issue
Block a user