Closed nbibler closed 6 years ago
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.
Should be addressed by https://github.com/emberjs/ember.js/pull/16563.
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.