rjournal / rjtools

Tools for AUTHORS to use for checking and submitting articles to the R Journal
https://rjournal.github.io/rjtools/
Other
31 stars 14 forks source link

JG: Alt text for images inserted with markdown markup #93

Open hturner opened 1 year ago

hturner commented 1 year ago

Comment from @ajrgodfrey

Images inserted with markdown markup are using the same text for alt text as for the figure caption. It would be better to use a simple default for missing alt text, e.g. "graphic without alt text"

Example: Figure 1 in RJ-2012-006

RJ-2012-006.Rmd (partial)

![Figure 1: Conceptual model of the Apple Xgrid framework (derived from
graphic by F. Loxy)](images/xgridframework.png){#fig:input1
width="100%"}

RJ-2012-006.html (partial)

uQmCC" style="width:100.0%" alt="Figure 1: Conceptual model of the Apple Xgrid framework (derived from graphic by F. Loxy)" />
<figcaption aria-hidden="true">Figure 1: Conceptual model of the Apple Xgrid framework (derived from
graphic by F. Loxy)</figcaption>

Potentially the alt text or the caption could be added as an attribute like the figure number and the width?

hturner commented 1 year ago

Not sure if I put this issue in the right place - if the attribute needs to be defined in rjtools, then it's fine as is. But it may just be an issue for converting legacy articles, cc @Abhi-1U.

dicook commented 11 months ago

This is possibly a pandoc issue.