jdan / 98.css

A design system for building faithful recreations of old UIs

Home Page:https://jdan.github.io/98.css

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Relying on aria-label prevents localisation

Neui opened this issue · comments

commented

From what I understand, the aria-label is used to label graphical stuff, that'll get read by an screen reader.

However, lets assume I want to translate the page into german. For that, I would also translate the aria-labels, so for example, instead of using aria-label="Close", I would use aria-label="Schließen".

However, doing that breaks the visual: The close button won't be rendered.
I see 2 ways to fix this:

  1. Add all possible combinations to the stylesheet. I don't think this is a good idea, since it would make the stylesheet unreasonably larger, and still prevent flexibility (for example, new languages, or any other custom text)
  2. Don't rely on aria-label, but use css classes, such as .title-bar-controls button.close or button.title-bar-controls-close.

Appreciate you calling this out, this is definitely a misstep on my part. I'm very much in favor of your second choice as long as we keep the aria-label for backwards compatibility.