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

feat: exclude script tags from hideOthers #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ariesclark
Copy link

@ariesclark ariesclark commented Oct 17, 2024

Script tags should not have the aria-hidden attribute, as it provides no benefit and can negatively impact performance. In many modern frameworks, the root body element often contains multiple script tags, leading to a noticeable performance decrease.

This PR excludes those tags and adds a test to ensure proper coverage.

@theKashey
Copy link
Owner

I was thinking about different ways how you can steer this library attention to only #root element, but haven't found a good/stable interface for it.

Hiding scripts is a good start 👍

@ariesclark
Copy link
Author

Can we get this released? I'd like to make PRs to downstream packages to improve performance.

Copy link

stale bot commented Feb 4, 2025

This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.

@stale stale bot added the state label Feb 4, 2025
@ariesclark
Copy link
Author

Can we merge this?

@stale stale bot removed the state label Feb 5, 2025
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