Re: [w3c/webcomponents] Add global reflecting attributes to ElementInternals? (#821)

ElementInternals is for setting internal values. `ariaPressed` will be "handled" by ElementInternals, but not in the same way that `setAttribute("aria-pressed", ...)` does. Instead it will set the default aria-pressed semantic. (Maybe we should rename it `defaultARIAPressed`.)

The example code you give doesn't seem to be a use case; I'm unclear what it's saying. Is the author trying to use title, unaware that it's a reflecting setter? Are they trying to set the title attribute, but unaware that you're not supposed to do that in constructors? I think there are clear solutions for either of those use cases (e.g., use a different name, or use connectedCallback, respectively) that don't require new spec and implementation work on ElementInternals.

So in general I agree with your last paragraph; the global attributes are generally not internal things (like default ARIA semantics are) and it doesn't make much sense to put them on ElementInternals.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/821#issuecomment-506150135

Received on Thursday, 27 June 2019 04:18:05 UTC