chore(nav): remove dead navigation CSS and redundant attributes #161

Stängd
öppnade 2026-08-02 12:30:26 +00:00 av supernaut · 0 kommentarer
Ägare

Found while reviewing the navigation. None of these breaks anything.

  • src/components/user-menu.astro:38-58 styles .sign-out-form, but
    src/components/sign-out.astro:55 renders class .sign-out. The selector never matches; the
    rules that do the work are the near-identical copy at sign-out.astro:29-45. About twenty lines
    of dead CSS on every page.
  • src/components/main-navigation.astro:21-25 returns the string "false", so every inactive link
    ships aria-current="false". Valid ARIA, but returning undefined makes Astro omit the
    attribute. Do not change isActivePath or src/lib/nav.test.ts — only the string the
    wrapper returns.
  • src/components/language-switcher.astro:45,50 sets aria-label and title to the same text.
    The accessible name comes from aria-label; title only adds a duplicate desktop tooltip and
    does nothing on touch.
  • src/style/variables.scss:54 describes --color-btn-secondary-* as "the nav 'Skapa konto'", but
    that navigation item is an IconLink now, not a button. Stale comment.

Done when

  • src/lib/nav.test.ts passes unchanged.
  • Inactive navigation links carry no aria-current attribute; the current page still carries
    aria-current="page" in both languages.
  • pnpm lint and pnpm check pass.

Part of gitborg/gitborg-docs#67.

Found while reviewing the navigation. None of these breaks anything. - `src/components/user-menu.astro:38-58` styles `.sign-out-form`, but `src/components/sign-out.astro:55` renders class `.sign-out`. The selector never matches; the rules that do the work are the near-identical copy at `sign-out.astro:29-45`. About twenty lines of dead CSS on every page. - `src/components/main-navigation.astro:21-25` returns the string `"false"`, so every inactive link ships `aria-current="false"`. Valid ARIA, but returning `undefined` makes Astro omit the attribute. **Do not change `isActivePath` or `src/lib/nav.test.ts`** — only the string the wrapper returns. - `src/components/language-switcher.astro:45,50` sets `aria-label` and `title` to the same text. The accessible name comes from `aria-label`; `title` only adds a duplicate desktop tooltip and does nothing on touch. - `src/style/variables.scss:54` describes `--color-btn-secondary-*` as "the nav 'Skapa konto'", but that navigation item is an `IconLink` now, not a button. Stale comment. ## Done when - `src/lib/nav.test.ts` passes unchanged. - Inactive navigation links carry no `aria-current` attribute; the current page still carries `aria-current="page"` in both languages. - `pnpm lint` and `pnpm check` pass. Part of gitborg/gitborg-docs#67.
supernaut lade till detta till projektet Bitborg Web 2026-08-02 12:34:29 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web#161
Ingen beskrivning angiven.