Skip to content

fix(isVisible): treat <summary> in closed <details> as visible#2847

Closed
AhmadHannan037 wants to merge 1 commit into
vuejs:mainfrom
AhmadHannan037:fix/details-summary-visibility
Closed

fix(isVisible): treat <summary> in closed <details> as visible#2847
AhmadHannan037 wants to merge 1 commit into
vuejs:mainfrom
AhmadHannan037:fix/details-summary-visibility

Conversation

@AhmadHannan037
Copy link
Copy Markdown
Contributor

Fixes #2626.

isVisible() previously returned false for <summary> (and <details> itself) when the parent <details> had no open attribute, even though the browser renders both. The check now mirrors HTML semantics: only non-

descendants of a closed <details> are hidden.

<details> (open or closed) → visible
<summary> (direct child) → visible
Other descendants → visible only when open
Tests added in tests/isVisible.spec.ts covering the open, closed, and nested-non-summary cases.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 4, 2026

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit ae00f18
🔍 Latest deploy log https://app.netlify.com/projects/vue-test-utils-docs/deploys/69f8f1a1c25bb8000899815b
😎 Deploy Preview https://deploy-preview-2847--vue-test-utils-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cexbrayat
Copy link
Copy Markdown
Member

Hi @AhmadHannan037

Thanks for the PR, but we already have one opened to solve the same issue in #2806 that we are going to prioritize.
Feel free to take a look at the other PR and suggest improvements

@AhmadHannan037
Copy link
Copy Markdown
Contributor Author

Hi @AhmadHannan037

Thanks for the PR, but we already have one opened to solve the same issue in #2806 that we are going to prioritize. Feel free to take a look at the other PR and suggest improvements

Going to close this since #2806 is already addressing the issue and is further along in review. Happy to help review there. Thanks!

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.

2 participants