-
Notifications
You must be signed in to change notification settings - Fork 349
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
[JSX] Desugar aria'foo to aria-foo for DOM elements #196
Comments
Also |
Yup, it should be a general transformation of |
I'm thinking maybe we can just use |
Could DOM elements potentially not have camelCased attribute names? |
We’d only be doing it for aria and data |
Oh, I was imagining it would be simpler to check for the |
Either is simple enough. But are you saying that we might as well go with |
Exactly, we can fully support any potential kebab-cased prop names thanks to |
My main nitpicky concern is that it's ugly and we don't want to encourage over-usage of |
I think real-world use will be minimal. Kebab-cased attrs are pretty rare (unless you're using Angular 1 or something). In practice this will be just a nice escape hatch, not a heavily-used feature. |
It's mandatory for a11y because of aria |
Ya, but that's usually a minority of all JSX attributes. I think we won't see too much |
Related: we might find a good aria-* solution anyway with rescript-lang/rescript#2614 |
how about not having to add a special syntax? <div
data={
"name": "some string"
}
aria={
"role": "button",
"label": "Open in modal"
}
/> |
Fixed in 0.4.2 thanks to I'll open another issue for |
Please, desugar |
Actual transformer's in the Reason repo.
The text was updated successfully, but these errors were encountered: