Skip to content

fix: deduplicate id="provenance" - #2976

Merged
serhalp merged 1 commit into
npmx-dev:mainfrom
GauBen:patch-1
Jun 29, 2026
Merged

fix: deduplicate id="provenance"#2976
serhalp merged 1 commit into
npmx-dev:mainfrom
GauBen:patch-1

Conversation

@GauBen

@GauBenGauBen commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Hi!

Small fix, no related issue

🧭 Context

id="provenance" may appear twice in the page if provenanceData is defined

image

https://github.com/search?q=repo%3Anpmx-dev%2Fnpmx.dev+%22id%3D%5C%22provenance%22&type=code

📚 Description

Issue discovered with Pa11y

@vercel

vercelBot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentJun 29, 2026 9:20am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewJun 29, 2026 9:20am
npmx-lunariaIgnoredIgnoredJun 29, 2026 9:20am

Request Review

@coderabbitai

coderabbitaiBot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 62bda6f9-8d02-4cfc-b41c-abab467e24bc

📥 Commits

Reviewing files that changed from the base of the PR and between 04a35e7 and cc93085.

📒 Files selected for processing (1)
  • app/components/PackageProvenanceSection.vue

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved the accessibility and structure of the package provenance section by removing an unnecessary section identifier while keeping the heading relationship intact.
    • No visible content changes were made to the section itself.

Walkthrough

The id="provenance" attribute is removed from the root <section> element in PackageProvenanceSection.vue. The element retains its aria-labelledby="provenance-heading" attribute and existing CSS classes.

Changes

Provenance Section Anchor Removal

Layer / File(s)Summary
Remove id from section element
app/components/PackageProvenanceSection.vue
The root <section> no longer carries id="provenance", removing the anchor target that #provenance hash links previously resolved to.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly matches the change: removing the duplicate provenance id.
Description check✅ PassedThe description is directly related and explains the duplicate provenance id fix.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Hello! Thank you for opening your first PR to npmx, @GauBen! 🚀

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@codecov

codecovBot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@gameromangameroman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, do you know how/why does it happen in the first place?

@GauBen

GauBen commented Jun 29, 2026

Copy link
Copy Markdown
ContributorAuthor

@gameroman because this section:

<section
v-if="hasProvenance(displayVersion) && isMounted"
id="provenance"
class="scroll-mt-20"
>

contains this section:

<sectionid="provenance"aria-labelledby="provenance-heading"class="scroll-mt-20">


I removed id="provenance" on the nested section

@gameroman

Copy link
Copy Markdown
Member

Thank you! That makes sense 👍

I wonder if we can completely avoid the nested <section>

@gameromangameroman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good I think 👍

@serhalp
serhalp added this pull request to the merge queueJun 29, 2026
Merged via the queue into npmx-dev:main with commit e851fe6Jun 29, 2026
25 of 26 checks passed
@github-actions

Copy link
Copy Markdown

Thanks for your first contribution, @GauBen! 🚀

We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role.

@github-actionsgithub-actionsBot mentioned this pull request Jun 29, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@GauBen@gameroman@serhalp