-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Reflection" can be a confusing term #1
Comments
I've outlined some ideas as to how this could be rectified in #6. Pasted below for conversation:
Meta Question:
|
Somehow this proposal "reflection" is more related to attributes that reference to an element (IDREFs) like Do we need to use this proposal to expose string attributes outside of the Shadow DOM? Is there a use case for that too? However, the delegation proposal is related to both things IDREF attributes but also string attributes. Not totally sure yet as I'm still trying to understand the different use cases. Also having some use case that combines delegation and reflection might be nice to have. To understand better what are the actual needs. |
Interesting insight. I’m not sure where you’d want to reflect a string out of a shadow root when you could have access to an element and you wouldn’t have access to that string from above. The only place I could think of right off might be dynamic translation contexts, but am not 100%. I’ll think about that some more and see if there’s a good demo to add to the explainer. |
We already use reflection term for ARIA attribute reflection, and reflection of HTML elements in general (see HTML spec: https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflect).
There reflection means that the HTML attributes are "reflected" on the JavaScript/DOM side, so one can query/modify them from JavaScript. Example:
With ARIA attribute reflection you can do things like:
If I understand correctly this proposal, this is a different kind of reflection than the one I've described above. This is more about how to "export" or "expose" the Shadow DOM internal elements, so they can be somehow referenced from outside the shadow tree. From the explainer:
So I believe this can be confusing, for example the README talks about
"reflect" ARIA attributes
, which is very similar to the wording we've been using for ARIA attribute reflection.Also in the AOM Features in progress document, this repo is now linked in Aria attribute reflection feature, which is not totally right I believe.
I don't have a great suggestion for a better name, but I think it'd be better to look for alternatives to avoid this kind of misunderstandings.
The text was updated successfully, but these errors were encountered: