arve0/markdown-it-implicit-figures

`figcaption: true` causes issues with screen reader

roobottom opened this issue · 2 comments

By adding figcaption: true screenreader on mac reads aloud the alt text of the image twice. This happens because the alt text is not removed. For example, consider this input:

![Roo, captivated by the view of the Alps from 38,000ft](roo-alps.jpg)

This has the following output:

<figure>
  <img src="roo-alps.jpg" alt="Roo, captivated by the view of the Alps from 38,000ft">
  <figcaption>Roo, captivated by the view of the Alps from 38,000ft</figcaption>
</figure>

Better for voiceover (and I presume other screen readers) would be:

<figure>
  <img src="roo-alps.jpg">
  <figcaption>Roo, captivated by the view of the Alps from 38,000ft</figcaption>
</figure>
arve0 commented

Hi 👋 Which version are you using? I believe this is a duplicate of #33, which is fixed.

My bad. I was using 0.9.0 - updated now and all fixed. I'll close this ticket.