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

Make library interoperable with Svelte 5 #1926

Merged
merged 3 commits into from
Mar 7, 2024
Merged

Make library interoperable with Svelte 5 #1926

merged 3 commits into from
Mar 7, 2024

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Mar 7, 2024

Review by commit – rebase merge.

#1908

There are several low-lift revisions that make this library interoperable with Svelte 5.

metonym and others added 3 commits March 6, 2024 19:05
Co-Authored-By: Eric Fulton <5297269+Sahasrara@users.noreply.github.com>
Closes #1924

Svelte 5 will not compile if `div` is nested inside `p` element. Refactor Link to render an `a` instead of `p` when disabled.
In Svelte 5, the comment is ignored when it's above the input element. Setting the comment at the top-level resolves the issue.
Copy link
Collaborator

@theetrain theetrain left a comment

Choose a reason for hiding this comment

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

Tested with svelte@5.0.0-next.72

@@ -79,6 +79,7 @@
$: dispatch(expanded ? "expand" : "collapse");
</script>

<!-- svelte-ignore a11y-autofocus -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Long-term, I recommend we remove autofocus functionality and guide users to instead utilize ref to manually set focus based on user or server events.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed – would love to sort out the ignorable a11y warnings from the rest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Continued in #1929

@theetrain theetrain merged commit 6152b78 into master Mar 7, 2024
3 checks passed
@theetrain theetrain deleted the svelte-5-compat branch March 7, 2024 03:49
@theetrain
Copy link
Collaborator

Fix was released in v0.83.0.

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.

Link: do not render <p>
2 participants