Subscribe on changes!

Type definition for aria-relevant is incorrect

avatar
Aug 23rd 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNp9Uc1KAzEQfpWYyyr0h9Jb2RZUCupBRQUvuYTd6TY1m4RkshaWfXcnWVo9SG/JfL/D9PzWuVkXga94GSqvHLIAGN1GGNU665H1zMOODWznbcsKohbCCFNZE5C1oWHrhF8XD6C1ZZ/W6/qquBGmnI92ZEQfhNZpiUA/xsr9gkmv5NSDhk4aXAsu61qhIlNya20ndRB80/c5YRjK+X4xSpVxEVk3bW0NmnSEEzHFnSP4hGOgfjvVzA7BGlqtT1rBK9s6pcG/uBwl+IplJGGS6n8/5Rn6CJPTvNpD9fXP/BCOaSb4q4cAvgPBzxhK3wCO8Pb9GY70PoPUPGpiXwDfIFgdU8eRdhdNTbX/8HLbx3wgZZqPsD0imHBaKhVNzCHzBaej3V9Y/bfucrbMOmEGPvwAa4az5w==

Steps to reproduce

Set the aria-relevant attribute on an HTML element to additions removals

What is expected?

This should be allowed.

What is actually happening?

TypeScript says Type '"additions removals"' is not assignable to type '"text" | "additions" | "additions text" | "all" | "removals"'.ts(2322)

System Info

No response

Any additional comments?

Per https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-relevant#values , "the value is a space-separated list of change types, including additions, removals, and text, with a shorthand all meaning all three". So Vue's type definition for this attribute is incorrect, it should allow values like additions removals or removals text.