Consider conversion of data-
/aria-
prefixed keys to nested variants
#1
Labels
enhancement
New feature or request
data-
/aria-
prefixed keys to nested variants
#1
In Rails there are two ways of setting
data
andaria
attributes when using thetag
andcontent_tag
helpers. These are to set the attribute by its full namedata-controller: "abc", data-response: "xyz"
or to use a nested hash:data: { controller: "abc", response: "xyz" }
.This library, and both the components and form builder assume people are using the latter. Using the former might lead to unintended consequences.It might make sense to detect the full name variant and either apply a conversion or provide some kind of warning to the developer. As this only applies to
data-
andaria-
prefixed attributes the conversion should be straightforward.The text was updated successfully, but these errors were encountered: