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
{{ message }}
Repository navigation
Reference Target feedback: nesting inside <label> and other implicit relationships #209
It seems to me that in order for Reference Target to work, we'll have to refactor all the algorithms that essentially do getElementById() today to find some kind of element. Why would we not at the same time tackle these implicit relationships?
I think it would be really bad if we ended up encouraging explicit over implicit relationships just because our refactoring didn't go quite far enough.
This is good feedback! I primarily made the decision to leave out support for nesting in order to keep the feature scoped to ID references (and not implicit references like nesting inside label). However, I agree that it makes sense that nested labels should work as well, and referenceTarget seems like a natural fit to achieve that, since it works with label's for.
Activity
behowell commentedon May 1, 2024
This is good feedback! I primarily made the decision to leave out support for nesting in order to keep the feature scoped to ID references (and not implicit references like nesting inside label). However, I agree that it makes sense that nested labels should work as well, and referenceTarget seems like a natural fit to achieve that, since it works with label's for.
We'll discuss it further at the F2F later this week: WICG/webcomponents#1050
For reference, here is the section in the explainer that discusses nesting inside label: https://github.com/WICG/aom/blob/gh-pages/reference-target-explainer.md#nesting-inside-label