Typeset icon indicating copy to clipboard operation
Typeset copied to clipboard

Screen readers cannot read output

Open davidmerfield opened this issue 9 years ago • 5 comments
trafficstars

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 avatar Jan 29 '16 17:01 davidmerfield

Google translate also screws up

davidmerfield avatar Mar 04 '16 15:03 davidmerfield

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

davidmerfield avatar Apr 21 '16 16:04 davidmerfield

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).

  • If user has set .post-typeset to a <div> element that already contains aria-label it may break things.
  • I suppose we can wrap the element with another span that contains the aria-label, but I also need to double check that this is the best approach.

I'll be investigating this in the coming days.

danielhaim1 avatar Jan 08 '20 21:01 danielhaim1

Would it work to just wrap the whole word instead?

<span class="pull-A">At</span> the beginning

AndrewKvalheim avatar May 16 '20 17:05 AndrewKvalheim

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

davidmerfield avatar May 16 '20 21:05 davidmerfield