Skip to content

fix: fix html-validation error#1658

Open
eryue0220 wants to merge 4 commits intonpmx-dev:mainfrom
eryue0220:fix/fix-html-validation-error
Open

fix: fix html-validation error#1658
eryue0220 wants to merge 4 commits intonpmx-dev:mainfrom
eryue0220:fix/fix-html-validation-error

Conversation

@eryue0220
Copy link
Contributor

@eryue0220 eryue0220 commented Feb 26, 2026

🔗 Linked issue

Resolve #1425

🧭 Context

Fix html-validation lint error when visit page /package/@pnpm/workspace.find-packages

📚 Description

  • Fix the aria id if the dropdown is not open
  • Disable the prefer-native-element when the element role is listbox

@vercel
Copy link

vercel bot commented Feb 26, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 26, 2026 2:50pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 26, 2026 2:50pm
npmx-lunaria Ignored Ignored Feb 26, 2026 2:50pm

Request Review

@codecov
Copy link

codecov bot commented Feb 26, 2026

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!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef5755c and fabad0f.

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

📝 Walkthrough

Walkthrough

ManagerSelect.vue: the button's aria-controls is now bound to listboxId only when the menu is open; otherwise it is undefined. ReadmeTocDropdown.vue: aria-controls is similarly conditional, aria-activedescendant now only returns a value when highlightedIndex and the corresponding item id exist, and active-item comparisons/class bindings were tightened to use the item id consistently. nuxt.config.ts: HTML validator rules gained prefer-native-element with an exclusion for listbox.

Suggested labels

a11y

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly relates to the changeset, explaining the fixes for aria id handling and html-validator rule configuration.
Linked Issues check ✅ Passed The changes address the core objective of issue #1425 by fixing aria-controls bindings and disabling the prefer-native-element rule for listbox elements.
Out of Scope Changes check ✅ Passed All changes are scoped to resolving HTML validation errors: aria-id fixes in dropdown components and html-validator configuration in nuxt.config.ts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e61657e and 65fcacd.

📒 Files selected for processing (3)
  • app/components/Package/ManagerSelect.vue
  • app/components/ReadmeTocDropdown.vue
  • nuxt.config.ts

rules: { 'meta-refresh': 'off' },
rules: {
'meta-refresh': 'off',
'prefer-native-element': ['error', { exclude: ['listbox'] }],
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Per https://discord.com/channels/1464542801676206113/1464926468751753269/1471511992434163844, I think if anything we'd want exactly the opposite (include), wouldn't we? As is this would suppress warnings about role=listbox, which we do want to eliminate.

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 this pull request may close these issues.

HTML validation errors

2 participants