Skip to content
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

Reference Target feedback: nesting inside <label> and other implicit relationships #209

Closed
annevk opened this issue Apr 24, 2024 · 1 comment · Fixed by #210
Closed

Reference Target feedback: nesting inside <label> and other implicit relationships #209

annevk opened this issue Apr 24, 2024 · 1 comment · Fixed by #210
Assignees

Comments

@annevk
Copy link

annevk commented Apr 24, 2024

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.

@behowell
Copy link
Collaborator

behowell commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants