←back to thread

108 points liquid99 | 10 comments | | HN request time: 1.062s | source | bottom
1. notpushkin ◴[] No.43360319[source]
Like others have already said, it’s an accessibility nightmare. On the other hand, it’s not like this is going away anytime soon – maybe screenreaders could learn to understand and read some such “fonts” (e.g. bold/italic at least)?
replies(3): >>43360462 #>>43360722 #>>43360966 #
2. MatthewWilkes ◴[] No.43360462[source]
Absolutely. The argument that screen readers shouldn't gain a heurisric for identifying this kind of text and normalising it down to pronouncable words is just prescribtivism, to my view.

ALL CAPS, SpOnGeBoB cASe, clap emphasis, and others carry specific meanings in colloquial written language, the use of other letterlike symbols can also. These should be presented in an accessible form to the user, rather than demanding that people refrain from using them.

replies(1): >>43369255 #
3. peebeebee ◴[] No.43360722[source]
For HTML, you can probably do the following:

  <span aria-label="my text">𖢑ꚲ 𖢧𖤟𖤗𖢧</span>
replies(2): >>43360772 #>>43361083 #
4. notpushkin ◴[] No.43360772[source]
If you want to use such an effect on your own website that’s probably the way to go (although I’d probably try to use real text in HTML and replace it with some CSS magic... or just use a web font).
replies(1): >>43360879 #
5. Cthulhu_ ◴[] No.43360879{3}[source]
For social media / forum sites etc, they should definitely add this. Make a plain text / accessible (user) name mandatory and a display name optional. And give end users the choice to show canonical name or display name.
6. tasuki ◴[] No.43360966[source]
Forget about the blind - what about those with perfect vision? Looking at that website, I wish I were unable to see it!
7. chrismorgan ◴[] No.43361083[source]
<https://www.w3.org/TR/using-aria/#practical-support-aria-lab...>:

> • Don't use aria-label or aria-labelledby on any other non-interactive content such as p, legend, li, or ul, because it is ignored.

> • Don't use aria-label or aria-labelledby on a span or div unless its given a role. When aria-label or aria-labelledby are on interactive roles (such as a link or button) or an img role, they override the contents of the div or span. Other roles besides Landmarks (discussed above) are ignored.

replies(1): >>43377137 #
8. xg15 ◴[] No.43369255[source]
That's true, but at some point, intention and accessibility will start to clash.

Like, there used to be that fad/meme of adding as many diacritics and other Unicode appendages to a text as possible. ("Cursed text" or something I think)

The diacritics will stack and turn the characters into monstrosities that will break the page layout and generally make the text look alien and distorted.

It also makes the text hard to read, which is the entire point.

But a screen reader is kind of at a dilemma here: If it ignores the diacritics and just reads the text normally, then the "weirdness" will be missing and the text will appear out of context. To convey that, the reader would have to intentionally read the text in a distorted voice - but this will make it hard to understand and could lead to unease and confusion if the distortion starts without warning.

There is also the question whether we want unexpected tone shifts at all. Like, it would be semantically correct to read all caps text in a shouting voice, but do we really want screen readers to randomly start shouting?

(Edit: oh right, it was Zalgo, not cursed text)

9. notpushkin ◴[] No.43377137{3}[source]
Good point. Any ideas how to implement it properly?
replies(1): >>43378193 #
10. chrismorgan ◴[] No.43378193{4}[source]
I have often wanted to do exactly this, and was disappointed when I learned aria-label couldn’t be used to replace the value exposed for non-interactive content. I have hunted for other techniques a couple of times, and never been completely satisfied, though things have improved in the last year and a bit.

The basic technique is roughly this:

  <span>
      <span aria-hidden="true">displayed text</span>
      <span inert class="visually-hidden">accessibility text</span>
  </span>

  <style>
      .visually-hidden {
          position: absolute;
          width: 1px;
          height: 1px;
          margin: -1px;
          overflow: hidden;
          clip-path: rect(0 0 0 0);
          -webkit-user-select: none;
          user-select: none;
          pointer-events: none;
      }
  </style>
The `inert` attribute is a recent addition which may exclude the accessibility text from find-in-page (maybe desirable, maybe undesirable, depending on the situation). Firefox and Chromium shipped that refinement of its behaviour in the last year and a half, Safari hasn’t yet (and seems to have reservations about the whole idea <https://bugs.webkit.org/show_bug.cgi?id=269909>).

You can also play with putting the accessibility text in a pseudoelement’s content (e.g. <span data-a11y-text=…><span aria-hidden=true>…</span></span> and [data-a11y-text]::after { content: attr(data-a11y-text); … }), which should these days be exposed in the accessibility tree, but Firefox find-in-page now includes generated content (though you can’t bridge real and generated content), and it wouldn’t surprise me if Chromium eventually followed suit, so I’m not convinced it’s worth the bother, especially if you lose `inert` or have to add an element anyway. But keeping it as an attribute instead of a separate element has some appeal.