Omit BCD link in SeeCompatTable macro if page has no BCD frontmatter/section
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 57
- Forks
- 47
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 68
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API
What specific section or headline is this issue about?
Link in the page banners to browser compat section is broken
What information was incorrect, unhelpful, or incomplete?
Some API landing pages with {{SeeCompatTable}} or {{securecontext_header}} macro, which generate the following banner text, include a link to the "Browser comparability" section, but the page does not have a browser-compat key in the front matter. So the link to the browser compat section is broken:
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
and
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
What did you expect to see?
Working link or no link
Do you have any supporting links, references, or citations?
At the moment, the issue seems to exist in only two landing pages (broken link to BCD section from the banner):
- https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API
- https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API
The following page does not have the browser-compat key but the "Browser compatibility" section is hand-written:
Do you have anything more you want to share?
This issue has been brought up before in a discussion (https://github.com/orgs/mdn/discussions/564#discussioncomment-1554227) and a somewhat related issue https://github.com/mdn/content/issues/17550.
MDN metadata
Page report details
- Folder:
en-us/web/api/webusb_api - MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/webusb_api/index.md
- Last commit: https://github.com/mdn/content/commit/4458494807b6f4898d504b6c0af0a45f8031cbf3
- Document last modified: 2023-12-10T06:28:37.000Z
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how Rari handles the SeeCompatTable and securecontext_header macros, then compare the generated banners with the mentioned WebUSB_API and WebOTP_API index.md pages. Check how the browser-compat frontmatter or section is detected, and verify that pages without it receive no BCD link while valid pages retain one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100