Skip to content

docs: update data-sveltekit-keepfocus docs #9421

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

Merged
merged 2 commits into from
Mar 15, 2023
Merged

Conversation

geoffrich
Copy link
Member

Tweak the wording and add additional information around data-sveltekit-keepfocus

  • add note at the top about these options also applying to forms, so that it's not surprising when we use a form for one of the options when the section is called "link options"
  • link existing focus reset docs
  • remove "focus will be reset to the body" -- I think it's better just to link the existing focus reset docs
  • more context on why using this on links or elements that don't exist on the new page is bad practice

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@geoffrich geoffrich requested a review from dummdidumm March 14, 2023 00:19
@dummdidumm
Copy link
Member

I think this adds some good points but also removes the info that using this on links will in fact make the a tag focussed - users may think focus will stay on the previous element. Can we add that back?

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