view: properly hide labels of the datetime selector

The accessibility labels where not properly hidden, which
resulted in the labels being visible and stacked vertically.
This commit is contained in:
Pierre de La Morinerie 2022-05-31 15:08:45 +02:00
parent a18fa8adb3
commit 149c6399f5

View file

@ -25,7 +25,7 @@ module ActionView
end
field_for = "#{prefix.join('_')}_#{@options[:field_name]}"
"<label class='screen-reader-text' for='#{field_for}_#{n}i'>#{label}</label>"
"<label class='sr-only' for='#{field_for}_#{n}i'>#{label}</label>"
end
# Returns the separator for a given datetime component.