Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider conversion of data-/aria- prefixed keys to nested variants #1

Open
peteryates opened this issue Mar 23, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@peteryates
Copy link
Member

In Rails there are two ways of setting data and aria attributes when using the tag and content_tag helpers. These are to set the attribute by its full name data-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- and aria- prefixed attributes the conversion should be straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant