In regular widget output I can add alt text using code like
widget <- htmlwidgets::prependContent(widget,
tags$p(altText, id = ariaLabelId(elementId),
hidden = NA))
and then have an aria-labelledby
attribute on the rgl canvas to link to this text. However, the prependContent()
function warns that it doesn't work in Shiny. Is there something else I can do in my rglwidget()
code or the "scaffolding" to create a fixed invisible element to use as alt text? I'd like to have this happen automatically, without requiring the user to do anything but specify altText
.