Hacker News new | ask | show | jobs
by JimDabell 2868 days ago
Screen readers don’t do very well with this, so please only use it for novelty purposes. Otherwise you will unnecessarily be locking people out from what you write.
5 comments

To be fair, combining some of the HN comments:

  $ python
  Python 3.7.0 (default, Jul 22 2018, 21:11:34)
  [Clang 9.1.0 (clang-902.0.39.2)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import unicodedata as ud
  >>> ud.normalize('NFKD', '''It's a kinda ascii-art thing that 𝔩𝔒𝔱𝔰 𝔢𝔬𝔲 π”žπ”«π”°π”΄π”’π”― π”₯𝔫 𝔠𝔬π”ͺπ”ͺ𝔒𝔫𝔱𝔰 π”žπ”©π”© π”£π”žπ”«π” π”Ά 𝔩𝔦𝔨𝔒 𝔱π”₯𝔦𝔰. 𝕆𝕣 π•π•šπ•œπ•– π•₯π•™π•šπ•€ π•šπ•— π•ͺ𝕠𝕦 π•¨π•’π•Ÿπ•₯ 𝕝𝕖𝕀𝕀 π•˜π• π•₯π•™π•šπ•” π•žπ• π•£π•– 𝕠𝕦π•₯π•π•šπ•Ÿπ•–.
  ...
  ... π™Έπšœπš—'𝚝 πšžπš—πš’πšŒπš˜πšπšŽ πšπš›πšŽπšŠπš?''')
  "It's a kinda ascii-art thing that lets you answer hn comments all fancy like this. Or like this if you want less gothic more outline.\n\nIsn't unicode great?"
  >>>
You'd hope a screen reader would have more effort put into it than a 3 second read of a HN thread?
I often wonder how many of the people who bring up the capabilities of screen readers are actually familiar with screen readers. (I'm admittedly not at all familiar with screen readers or their capabilities).
As a counterpoint, selecting that text and choosing β€œspeak” from the pop up menu doesn’t speak that text on iOS.

VoiceOver on iOS doesn’t speak it, either.

> Screen readers don't do very well with this

Badly-implemented screen readers don't do very well with this. The Unicode Standard provides a Normalization Form for Compatibility Decomposition (NFKD / NFKC) that screen readers definitely should adopt in their Unicode implementation [1].

[1] http://www.unicode.org/reports/tr15/

Well, look forward to spammers using this to bypass the spam filters...
Also using similar unicode characters in your username for nefarious spoofing attacks or worse -- https://labs.spotify.com/2013/06/18/creative-usernames/

This is called a Homoglyph attack.

If you accept unicode for strings that should be "unique" (eg username), there are various normalization schemes that basically convert equivalent-ish looking characters into a consistent hash.

I have no doubt spam filters use this.

I'm still waiting for the .corn TLD...
Followed by spam filters keying in on use of such alternative/modifier characters and marking them as spam. Better check your spam folder if you get a lot of e-mails with mathematical formulas.
Don't they already do that? I can clearly remember subjects that mixed latin, cyrillic, greek and some more exotic scripts to do just that.
That really has to get fixed though.
It doesn't and shouldn't.

The whole point of having Mathematical Alphanumeric Symbols as separate unicode code points, rather than just using normal latin characters with style markup, is so they can be used when the different letters have semantically different meanings -- in particular in maths when 𝘹 and π˜… can be in the same formula, representing different concepts. They're not a replacement for style markup.

In other words, they're different characters specifically so that screen readers can know to read them out loud differently!

Trying to 'fix' screenreaders by having them read anything that them as if they were normal latin characters, to accommodate people who like using the Mathematical Symbols block for fun in places which only allow plain text, would completely defeat the actual purpose of them.

https://www.unicode.org/faq/ligature_digraph.html#Pf6

How do screen readers handle other aspects of mathematical equations? For example, if I have an equation like "A equals B to the C", how do I represent this such that a screen reader will say it correctly? As far as I can tell, I can't.

I see the FAQ you linked states that I'm supposed to use markup for this. Unfortunately, that means the screen reader needs to understand math markup to work correctly. If that's the case, it seems like we could just include other concerns like Bold X vs X in the math markup as well.

> How do screen readers handle other aspects of mathematical equations? For example, if I have an equation like "A equals B to the C", how do I represent this such that a screen reader will say it correctly?

This was one of the problems that MathML was built to solve, see https://accessibility.princeton.edu/blogs/mathml-accessible-...

Am I confused as to what unicode.style is doing? Oh, yes I am. It's using U+1D400 MATHEMATICAL BOLD CAPITAL A and such. I see. Ok, thanks for setting me straight!
It’s really not a screenreader’s job to guess what a character might be being pressed into service to represent in a given scenario, and to try to work out when that’s inappropriate and it should be using the original specified meaning.
Well, it kind of is. In my mind, a screen reader should read anything that a healthy human can. Ideally even text in images and any sort of weirdness.
Then again different healthy humans read texts differently. There's no such thing as a canonical reading and any reading bring in prior semantics.

There was a sign posted in the break room of a lab I used to work at. It read, "<long complex equation> is easy for you to read, but not for everyone. Volunteer to read for the blind." It was a good double whammy.

Speaking of styling things for novelty, there's also this

https://beta.observablehq.com/@mbostock/text-styles