bcgov / bcmaps

An R package of map layers for British Columbia
http://bcgov.github.io/bcmaps/
Apache License 2.0
73 stars 17 forks source link

Hide uninformative plot captions in vignettes #133

Closed stephhazlitt closed 1 year ago

stephhazlitt commented 1 year ago

I am not sure when this behaviour started, but the plots in the vignettes have right-aligned figure captions below them, which are derived from the chunk labels, e.g. plot of chunk convert. I am not a fan. I suggest we remove them. See https://stackoverflow.com/questions/21329864/is-there-a-way-to-hide-figure-captions-when-using-knitr-and-pandoc-to-create-doc

boshek commented 1 year ago

Interesting. #131 re-rendered the vignettes and a new div got added: https://github.com/bcgov/bcmaps/blob/a55b2e806072709bfe046c7134e98001df8dc8a3/vignettes/add_points.Rmd#L63-L66

Not sure why the caption is being added but the fig.cap might work. We should just make sure that doesn't also nuke the alt text.

ateucher commented 1 year ago

Interesting - seems like an addition for accessibility that may have gone astray.

ateucher commented 1 year ago

Looks like that did it: https://bcgov.github.io/bcmaps/dev/articles/bcmaps.html

stephhazlitt commented 1 year ago

It looks like that figure label was the same as the alt tag, and so as @boshek raised, this change removes the alt as well. However, the alt tags that were auto generated were not informative (e.g., alt="plot of chunk plot-maps"). Perhaps we add in proper alt tags?

ateucher commented 1 year ago

That would be the best option for sure

stephhazlitt commented 1 year ago

🙌