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

Meta: Links that take you where you already are #9811

Open
not-my-profile opened this issue Sep 29, 2023 · 8 comments
Open

Meta: Links that take you where you already are #9811

not-my-profile opened this issue Sep 29, 2023 · 8 comments

Comments

@not-my-profile
Copy link
Contributor

not-my-profile commented Sep 29, 2023

The HTML parsing page contains several links that take you directly to where you already are. E.g. clicking on the "in body" hyperlink just takes you to the heading immediately before it.

image

I consider these links to be redundant and rather confusing. They also rather unnecessarily show up in the backreferences of the <dfn> element generated by html-dfn.js.

@domenic
Copy link
Member

domenic commented Sep 29, 2023

I think it's better to consistently link all insertion modes, even if you're already in them.

@not-my-profile
Copy link
Contributor Author

A hyperlink has one of two purposes:

  • to take you somewhere else, or to
  • make the current location sharable.

The former clearly doesn't apply since it doesn't take you anywhere else and the latter also isn't necessary since there already are the § links before the headings. The links thus do not have any purpose and should be removed. This is also a matter of accessibility ... useless links certainly only negatively impact it.

@tabatkins
Copy link
Contributor

In the context of a spec, a hyperlink also helps to indicate that the word/phrase is a technical term of art, rather than a plain English term.

@not-my-profile
Copy link
Contributor Author

For the terms in questions that would better be accomplished with dfn elements.

@not-my-profile not-my-profile changed the title Meta: Links that already take you where you are Meta: Links that take you where you already are Sep 29, 2023
@annevk
Copy link
Member

annevk commented Sep 29, 2023

The heading uses that. The references to it use <a>.

@not-my-profile
Copy link
Contributor Author

Right ... so why don't we move the dfn annotations from the heading to the first mention of the term in the paragraph after it? Resolving both this issue as well as whatwg/whatwg.org#425?

@annevk
Copy link
Member

annevk commented Sep 29, 2023

I think that would be okay (though @domenic might disagree based on his response there), but it would be quite the refactor ID-wise as now the heading and <dfn> need separate IDs.

@not-my-profile
Copy link
Contributor Author

Oh ... that's a good point I haven't considered. Ok yeah I think we we want to keep the dfn elements in the headers in this case. I still think this emphasis would be better done with an em tag rather than using links that take you nowhere.

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

No branches or pull requests

5 participants
@domenic @tabatkins @annevk @not-my-profile and others