When making custom Shiny inputs, this class is properly automatically added to the outer container alongside the input id at the time the HTML-generating Shiny input function is called. This is as intended.
However, I am finding that if such a widget contains any
input tags deeper within its HTML hierarchy (i.e., custom checkboxes), and that input tag has an
id attribute, the presence of the
id attribute on the input tag appears to cause Shiny to also automatically append
class='shiny-bound-input' in every case.
I do not know if this is unintended or by design, but it is problematic for designing for accessibility. I need the ability to create input tags that are part of custom Shiny inputs and that must have unique id attributes for accessibility reasons, but which are not reactive (not sure if that's the right word to use in this context).
Is it possible to prevent this in Shiny itself? Am I doing something wrong to cause this? As far as I can tell, any custom widget that has an input such as
<input type="checkbox" id="inputid-option1" ...
will cause Shiny to force the
class="shiny-bound-input" to appear.
Is my only option going to be to use an ad hoc JS solution to listen to widgets and remove
shiny-bound-input wherever I need to? If so, can someone recommend the least bad way to do that?