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

[Markdown] [ Web/API] Remove id attributes #7899

Closed
wbamberg opened this issue Aug 14, 2021 · 3 comments
Closed

[Markdown] [ Web/API] Remove id attributes #7899

wbamberg opened this issue Aug 14, 2021 · 3 comments
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@wbamberg
Copy link
Collaborator

wbamberg commented Aug 14, 2021

Part of #7898.

In preparation for Markdown, I'd like to remove id attributes in our Web/API docs that are not attached to headings.

There are two main reasons why people do this:

  • to provide a target for a link fragment like https://developer.mozilla.org/en-us/docs/web/api/xmlhttprequest#thing. When removing these it's worth checking to see whether it's being linked internally, and if so, what's the best we can do to make the internal link still go somewhere reasonable. Sometimes we should add a new heading that can be a target (and this improves the page), sometimes we can just link to the nearest heading above. In the CSS docs many internal links were in the immediately preceding section (for values of "Syntax") and I just removed those.

  • on a <div>, to provide a "scope" for an EmbedLiveSample macro call. In these cases we need to replace the <div> with a heading that the EmbedLiveSample call can reference. Usually this makes the pages better, because we're explicitly signalling an example. Sometimes there will be rework/reorganization needed though, because the <div id= is used to pick out a specific set of code blocks among some other code blocks that should not be included.

@wbamberg wbamberg added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Aug 14, 2021
@wbamberg wbamberg changed the title Content bug: <TITLE OF PROBLEM> [Markdown] Remove id attributes from Web/API Aug 14, 2021
@wbamberg

This comment has been minimized.

@wbamberg wbamberg changed the title [Markdown] Remove id attributes from Web/API [Markdown] [ Web/API] Remove id attributes Aug 14, 2021
@teoli2003
Copy link
Contributor

The AudioParam page has two ids, "a-rate" and "k-rate" used in quite a lot of Web Audio pages. These will need a specific PR. (Noting this here so we don't forget)

@wbamberg
Copy link
Collaborator Author

All done!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

2 participants