forked from yvv/decision
v3 : menu — nom accessible de « Docs de référence » avec son nombre de docs
Le lien porte « Docs de référence, 1 doc en cours » (fr, en, es) au lieu d'un texte masqué collé au libellé ; contrôlé dans C15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
<ul class="tools">
|
||||
{#each TOOLS as tool (tool)}
|
||||
{@const on = inTool(tool)}
|
||||
{@const counted = tool === 'docs' && count !== null}
|
||||
<li>
|
||||
<a
|
||||
href={toolHref(tool, target)}
|
||||
@@ -58,12 +59,11 @@
|
||||
class:off={tool !== 'docs'}
|
||||
class:current={on}
|
||||
aria-current={on ? 'page' : undefined}
|
||||
aria-label={counted ? i18n.plural('nav.docs.count', count ?? 0, { label: t(LABELS[tool]) }) : undefined}
|
||||
onclick={() => onnavigate?.()}
|
||||
>
|
||||
<span>{t(LABELS[tool])}</span>
|
||||
{#if tool === 'docs' && count !== null}
|
||||
<span class="count" aria-hidden="true">{count}</span><span class="visually-hidden">{i18n.plural('nav.docs.count', count)}</span>
|
||||
{/if}
|
||||
{#if counted}<span class="count" aria-hidden="true">{count}</span>{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user