-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
v6.0.1 label tagName: '' update is a breaking change #129
Comments
Give v6.0.2 a try. |
The change overall is nice but it turned out one other implicit behaviour had changed. Before v6.0.1 label elements were always rendered even if contents itself were empty: c1ad3ba#diff-6b8cfae49a619d5b92f6b26f55cc03cfL1 After v6.0.1 things are wrapped in Because before v6.0.1 label elements were always rendered and those elements have actions on them, so simulating Only way I can make my tests work again is to use something like:
Switch component does not do any ...attributes spreading either: https://github.com/knownasilya/ember-toggle/blob/master/addon/components/x-toggle-switch/template.hbs#L15 |
Better "workaround" for my situation is actually to begin adding specific name on elements:
And avoid using For reference: https://github.com/knownasilya/ember-toggle/blob/master/addon/components/x-toggle-switch/template.hbs#L7 |
This was the case, but I think was the wrong behavior.
This component is not tagless, so Ember applies the attributes automatically.
Might be worth documenting a basic test setup. |
This is correct but since none of the actions are bound to the outer switch Triggering click on outer |
Yeah, understood, but for accessibility the span should not be clickable. On another note, if we added The real solution is to convert to Glimmer Components and set attributes only on the label. I'll probably be tackling that sometime in the next month. |
Yes, that sounds like a proper solution. |
Recent v6.0.1 which converted label component to tagless component is kind of a breaking change.
See my comment on the commit:
0b9e39e#commitcomment-36809108
The text was updated successfully, but these errors were encountered: