Skip to content

Conversation

@benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented Oct 9, 2025

πŸ”— Linked issue

Resolves #4879

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR reverts ae30f94 meant to solve #3227 but fixing this edge case introduced a major accessibility issue.

You can achieve this behavior back by preventing the closeAutoFocus event:

<template>
  <UModal :content="{ onCloseAutoFocus: (e) => e.preventDefault() }">
    <UButton color="neutral" variant="outline" label="Open" />
  </UModal>
</template>

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 9, 2025

npm i https://pkg.pr.new/@nuxt/ui@5191

commit: 0f36210

@benjamincanac benjamincanac merged commit 8099440 into v4 Oct 9, 2025
15 checks passed
@benjamincanac benjamincanac deleted the pr/4879 branch October 9, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UModal A11y: Focus does not return to trigger element after closing

3 participants