davidmerfield / Typeset

An HTML pre-proces­sor for web ty­pog­ra­phy
https://typeset.lllllllllllllllll.com/
Creative Commons Zero v1.0 Universal
2.41k stars 52 forks source link

Screen readers cannot read output #38

Open davidmerfield opened 8 years ago

davidmerfield commented 8 years ago

Screen readers stumble on something like <span>a</span>t, reading it as 'A T' instead of 'at'.

This makes the optical margin alignment and hanging punctuation output unusable for people using screen readers.

We should be able to solve this using:

<p aria-label="at"><span>a</span>t</p>
davidmerfield commented 8 years ago

Google translate also screws up

davidmerfield commented 8 years ago

I've now disabled the optical margin alignment feature by default. It breaks too many things.

danielhaim1 commented 4 years ago

I need to think this through and do some research, from both web accessibility and search optimization.

One solution that was discussed is the possibility of adding an aria-label to the parent element that's being converted -- but that's too risky (and may require a major version bump that will break some sites).

I'll be investigating this in the coming days.

AndrewKvalheim commented 4 years ago

Would it work to just wrap the whole word instead?

<span class="pull-A">At</span> the beginning
davidmerfield commented 4 years ago

@AndrewKvalheim Brilliant! I can't think of a good reason that would not work