fix(core): do not rename ARIA property bindings to attributes#63925
fix(core): do not rename ARIA property bindings to attributes#63925leonsenft wants to merge 1 commit intoangular:mainfrom
Conversation
angular#62630 made it so that all ARIA property bindings would write to their corresponding attribute instead. The primary motivation for this change was to ensure that ARIA attributes were always rendered correctly on the server, where the emulated DOM may not correctly reflect ARIA properties as attributes. Furthermore, this change added support for binding to ARIA attributes using the property binding syntax (e.g. `[aria-label]`). Unfortunately, angular#62630 relied on the incorrect assumptions that an ARIA property name could be converted to its attribute name (without hardcoding the conversion), and that the value of an ARIA property matched its corresponding attribute. For example, the `ariaLabelledByElements` property's value is an array of DOM elements, while the corresponding `aria-labelledby` attribute's value is a string containing the IDs of the DOM elements. This partially reverts angular#62630 so that only property bindings with ARIA attribute names (begin with `aria-`) are converted to attribute bindings. * `[ariaLabel]` will revert to binding to the `ariaLabel` property. * `[aria-label]` will continue binding to the `aria-label` attribute. Note the only difference between `[aria-label]` and `[attr.aria-label]` is that the former will attempt to bind to inputs of the same name while the latter will not.
8410dcf to
713d580
Compare
|
Since this is somehow a breaking change, do we want to target patch ? |
In a way it's fixing the breaking behavior of the last release, but I've moved it to target the next major release. |
|
I'm actually second guessing my question. The broken behavior is only for attributes/props that we still don't support, right ? |
|
This PR was merged into the repository. The changes were merged into the following branches:
|
You could construe this change as breaking for SSR, since something like |
…angular#63925)" This reverts commit f008045.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
#62630 made it so that all ARIA property bindings would write to their corresponding attribute instead. The primary motivation for this change was to ensure that ARIA attributes were always rendered correctly on the server, where the emulated DOM may not correctly reflect ARIA properties as attributes. Furthermore, this change added support for binding to ARIA attributes using the property binding syntax (e.g.
[aria-label]).Unfortunately, #62630 relied on the incorrect assumptions that an ARIA property name could be converted to its attribute name (without hardcoding the conversion), and that the value of an ARIA property matched its corresponding attribute. For example, the
ariaLabelledByElementsproperty's value is an array of DOM elements, while the correspondingaria-labelledbyattribute's value is a string containing the IDs of the DOM elements.This partially reverts #62630 so that only property bindings with ARIA attribute names (begin with
aria-) are converted to attribute bindings.[ariaLabel]will revert to binding to theariaLabelproperty.[aria-label]will continue binding to thearia-labelattribute.Note the only difference between
[aria-label]and[attr.aria-label]is that the former will attempt to bind to inputs of the same name while the latter will not.