You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using radio button collections in my app and using the common practice of hiding the radios and styling the labels. To make this work with tab navigation it is necessary to add tabindex to the labels. I did some digging and found that the only option that is respected when building the labels is :item_label_class. ActionView allows us to pass any options we want to the builder so not sure why we're restricted to just the class.
I've monkey patched locally and it works great.
I changed this method to also respect @options[:item_label_html] with the following change
Environment
Current behavior
This isn't a bug, it's a limitation in how the code is written (only passes
class: label_class
to the builder which accepts any options).I'm using radio button collections in my app and using the common practice of hiding the radios and styling the labels. To make this work with tab navigation it is necessary to add tabindex to the labels. I did some digging and found that the only option that is respected when building the labels is :item_label_class. ActionView allows us to pass any options we want to the builder so not sure why we're restricted to just the class.
I've monkey patched locally and it works great.
I changed this method to also respect
@options[:item_label_html]
with the following changeNow it's possible to config the inputs with
or
If this is a change you would allow I'd be happy to create a PR and add test coverage.
The text was updated successfully, but these errors were encountered: