Skip to content

fix(logo): give LogoMark an accessible name; silence "ST" in Logo (#395) - #472

Merged
presidojay1 merged 2 commits into
StellarTickets:mainfrom
Dexperiencee:fix/395-logomark-accessible-name
Nov 20, 2026
Merged

presidojay1 merged 2 commits into
StellarTickets:mainfrom
Dexperiencee:fix/395-logomark-accessible-name

Conversation

@Dexperiencee

@Dexperiencee Dexperiencee commented Nov 20, 2026 •

Copy link
Copy Markdown

Summary

The "ST" monogram span inside LogoMark was exposed to assistive technology as ordinary visible text, causing two problems:

  • Standalone use (auth-layout, global-error): screen-readers announced "ST" as the first content on the page — no brand name, no context.
  • Inside Logo (navbar): the accessible output was "ST StellarTickets", so the home link was announced as "ST StellarTickets link".

Changes

src/components/logo.tsx

LogoMarkImage — the shared render that both LogoMark and the satori path use:

  • Accepts three new optional props: role, aria-label, aria-hidden — passed through to the outer wrapper <div>.
  • The "ST" <span> now has aria-hidden="true" unconditionally. When the wrapper carries role="img" aria-label="StellarTickets" the label is what AT reads; the span text would otherwise be announced twice. For the satori/LogoMarkImage-direct path the span is still visually rendered — the aria-hidden attribute has no effect in a non-DOM satori render.

LogoMark — the browser component (runs useId):

  • Accepts an aria-hidden prop.
  • When aria-hidden is falsy (standalone use — auth-layout, global-error): renders LogoMarkImage with role="img" aria-label="StellarTickets". AT announces "StellarTickets".
  • When aria-hidden is truthy (decorative use inside Logo): renders LogoMarkImage with aria-hidden="true" and no role/label. AT skips the mark entirely.

Logo:

  • Passes aria-hidden="true" to <LogoMark>. The visible wordmark text "StellarTickets" that follows is what AT reads — the mark is now decorative.

Before / after for each context:

Context Before After
auth-layout desktop mark (56 px) "ST" "StellarTickets" (image)
auth-layout mobile mark (32 px) "ST" "StellarTickets" (image)
global-error mark (40 px) "ST" "StellarTickets" (image)
Logo / navbar home link "ST StellarTickets link" "StellarTickets link"
icon.tsx / opengraph-image.tsx / logo-512 (LogoMarkImage direct) unchanged unchanged (satori path)

src/components/logo.test.tsx (new)

Closes #395
Closes #396
Closes #397
Closes #398
Seven tests covering:

  1. LogoMark standalone → role="img", aria-label="StellarTickets"
  2. LogoMark standalone → "ST" span has aria-hidden="true"
  3. LogoMark aria-hidden="true" → wrapper is aria-hidden, no role/label
  4. Logo → inner mark is aria-hidden, "StellarTickets" text present, no role="img" inside
    5–7. LogoMarkImage prop pass-through for role/aria-label, aria-hidden, and default (no attrs)

Adds aria-hidden="true" to the "ST" span in LogoMarkImage — the span was
visible text exposed to AT, causing screen-readers to announce "ST" on
pages where LogoMark appeared alone (auth-layout, global-error).

Adds role="img" aria-label="StellarTickets" to the LogoMark wrapper div
so standalone use has a correct accessible name.

LogoMark now accepts an aria-hidden prop: when true (decorative use inside
Logo) it passes aria-hidden="true" to LogoMarkImage and omits the
role/label; when absent (standalone use) it passes role="img" and the
label instead.
Seven tests covering the three key scenarios:
- LogoMark standalone: role="img", aria-label="StellarTickets", "ST" span
  is aria-hidden so the label is not read a second time.
- LogoMark decorative (aria-hidden prop): wrapper is aria-hidden with no
  role or label.
- Logo: the inner LogoMark is aria-hidden so AT reads only "StellarTickets"
  from the visible wordmark, not "ST StellarTickets".
- LogoMarkImage: role/aria-label/aria-hidden pass-through; no aria
  attributes by default (satori path).
@netlify

netlify Bot commented Nov 20, 2026

Copy link
Copy Markdown

👷 Deploy request for stellartickets pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit cb35c81

@drips-wave

drips-wave Bot commented Nov 20, 2026

Copy link
Copy Markdown

@Dexperiencee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@presidojay1
presidojay1 merged commit 8c396ea into StellarTickets:main Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants