I received a request a few days ago to add alt text to the plots in the HTML vignettes for the rgl package.

That was easy to do, and I did it, but realized most of the graphics that rgl produces are not in <img> format, they are WebGL canvases, and those don't support the same method of adding alternate text. Online I've seen a variety of suggestions about how to do it for <canvas> elements, and have implemented one of them.

Could I ask someone who is familiar with one or more screen readers to test whether the method that I used works? A sample web page produced with the new code is here:

  https://dmurdoch.github.io/rgl/dev/articles/rgl.html

The very first graphic is a plot of the iris data, and it should have alt text reading "rglwidget in chunk unnamed-chunk-1".

That was default text generated without user input, users could put whatever they wanted there instead.

Some related questions:

 - Could you suggest better default text to use?

 - Could you suggest good custom text for this particular graphic?

- The text is inserted when some Javascript has run to initialize the page, so if the Javascript fails, there'll be no alt text. Is that a reasonable limitation?

Duncan Murdoch

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to