Open
Description
Right now the property/attribute reflection in the ssr-
packages is a bit hairy. I don't think that we need to sniff at runtime which props are present in the component (title
, ariaLabel
, etc.) – we can just move the known lists of global HTML props / ARIA props to ssr-runtime
and put them all on a shared prototype (or similar mechanism). This will simplify the SSR compiler code quite a bit.
Another small bug: calling
this.ariaLabel = undefined
this.title = undefined
(etc)
should result in the corresponding attributes being removed, same as setting null
. This is just how HTML IDL attribute reflection works. Currently this is busted for ARIA properties because @lwc/aria-reflection
doesn't handle undefined
correctly for backwards compat.
Activity