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
In the ARIAMixin definition of TS 4.4-rc, the aria* properties are non-nullable, but according to the spec draft for AOM aria reflection with the AriaAttributes mixin, it seems to be nullable. Should these types need to be reconsidered to be nullable?
I think I agree that this is probably something we want to be classed as optional properties though, not quite decided. What does it look like to hit an error with this?
We used to have Element-like interface implementation which used to have their own ariaLabel/ariaExpanded properties. The type of the two properties is string|undefined which now have problem on assignment to Element type as Element starts to extend from ARIAMixin as well with having the properties as a string type.
Sample error message:
TS2345: Argument of type 'X' is not assignable to parameter of type 'Element'.
Types of property 'ariaExpanded' are incompatible.
Reacted by Al Marks, John Kreitlow and Wasuwat Limsuparhat
Activity
orta commentedon Aug 25, 2021
Linking to microsoft/TypeScript#45571
It looks like this is defined upstream as not being nullable: https://github.com/w3c/webref/blob/master/ed/idlnames/ARIAMixin.idl - which does seem to match that spec https://www.w3.org/TR/wai-aria-1.2/#AriaAttributes
I think I agree that this is probably something we want to be classed as optional properties though, not quite decided. What does it look like to hit an error with this?
h-joo commentedon Aug 25, 2021
We used to have
Element-like interface implementation which used to have their ownariaLabel/ariaExpandedproperties. The type of the two properties isstring|undefinedwhich now have problem on assignment toElementtype asElementstarts to extend fromARIAMixinas well with having the properties as astringtype.Sample error message:
saschanaz commentedon Aug 27, 2021
So, per the spec, assigning
undefinedis wrong and it will be converted to a string"undefined".(chore) Fix Typescript 4.4 compilation issues with aria properties
(chore) Fix Typescript 4.4 compilation issues with aria properties
(chore) Fix Typescript 4.4 compilation issues with aria properties
jnurthen commentedon Sep 17, 2021
Note w3c/aria#1611 makes them nullable again.
saschanaz commentedon Sep 17, 2021
Thanks, in that case it will be updated by webref within a few days.
saschanaz commentedon Nov 14, 2021
Fixed by #1200
@github-actions close
github-actions commentedon Nov 14, 2021
Closing because Kagami Sascha Rosylight (@saschanaz) is one of the code-owners of this repository.
WebUI: Update TypeScript compiler to 4.5.5