You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #15828 seemed to introduce a (unexpected?) change to the behavior of ariaRole on Components.
In previous versions of Ember, the ariaRole is allowed to be dynamic and the role attribute on the generated element would update as expected. If it were initially falsy, there would be no role attribute. If it later became truthy, a role attribute would be appended.
Once the PR was merged into v3.1.0-beta.1 (at 36ac96a), there is now a conditional check which optionally binds the attribute. Only if ariaRole is truthy at instantiation will it be monitored for future changes. If it's initially falsy, no binding will be setup and any future changes to ariaRole will not add a role attribute to the element.
Was this an intended behavior change? If so, I don't see it called out in the CHANGELOG.
The text was updated successfully, but these errors were encountered:
nbibler
changed the title
Unexpected behavior change of ariaRole with glimmer-vm upgrade
Unexpected behavior change of ariaRole with v3.1.0-beta.1 glimmer-vm upgrade
Mar 16, 2018
nbibler
added a commit
to IvyApp/ivy-tabs
that referenced
this issue
Mar 16, 2018
Oh no! I'm sorry I missed this issue! The basic change needed here is to do ariaRole in component instead of if (get(component, ariaRole)) {} like was done above. It will still do less work than before (most components do not have or use ariaRole at all), but it will allow a component to not set an ariaRole by returning a falsey value.
FYI - The fix for this has been pulled into release (for 3.1.x release) and beta (for 3.2.0-beta.x release). The latest builds (in 10-15 minutes) to the release, beta, and canary channels should include the fix (you can get the latest tarball URL via ember-source-channel-url).
PR #15828 seemed to introduce a (unexpected?) change to the behavior of
ariaRole
on Components.In previous versions of Ember, the
ariaRole
is allowed to be dynamic and therole
attribute on the generated element would update as expected. If it were initially falsy, there would be norole
attribute. If it later became truthy, arole
attribute would be appended.Once the PR was merged into v3.1.0-beta.1 (at 36ac96a), there is now a conditional check which optionally binds the attribute. Only if
ariaRole
is truthy at instantiation will it be monitored for future changes. If it's initially falsy, no binding will be setup and any future changes toariaRole
will not add arole
attribute to the element.The change is highlighted below:
Was this an intended behavior change? If so, I don't see it called out in the CHANGELOG.
The text was updated successfully, but these errors were encountered: