Skip to content

UHeader accessibility issue in modal mode #6257

@Oui-Dev

Description

@Oui-Dev

Environment

Operating system Windows 10.0.26200
CPU AMD Ryzen 7 3800X 8-Core Processor (16 cores)
Node.js version v24.14.0
nuxt/cli version 3.34.0
Package manager npm@11.12.1
Nuxt version 4.4.2
Nitro version 2.13.2
Builder vite@7.3.1
Config app, compatibilityDate, css, devtools, fonts, icon, modules, motionV, nitro, routeRules, runtimeConfig, security, sitemap, typescript, ui, vite
Modules @nuxt/ui@4.5.1, @nuxt/eslint@1.15.2, @nuxt/image@2.0.0, @nuxt/fonts@0.14.0, @nuxtjs/sitemap@7.6.0, @nuxtjs/robots@5.7.1, @vercel/analytics@2.0.1, @vercel/speed-insights@2.0.0, nuxt-security@2.5.1, nuxt-schema-org@5.0.10, motion-v/nuxt@2.2.0

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.5.1

Reproduction

https://codesandbox.io/p/devbox/nuxtui-null-type-issue-forked-zmqycy?workspaceId=ws_66GCezx3N94KbEtkfR1vKb

Description

If I use the UHeader in modal mode, navigate with my keyboard to open the modal, and then continue navigating with "tab", I'll navigate through the page content first, before the modal content.

I think there's a slight focus trap issue when opening the modal. Once the focus is in the modal, the focus trap works correctly (when I "tab", I can no longer navigate through the page content).

I also noticed a mismatch in the doc, the style of the container is as follows: container: 'flex items-center justify-between gap-3 h-full', However in reality this is what is applied (tell me if you want me to separate this point into another issue) :
Image

Additional context

I don't know if my explanation is very clear, feel free to ask if needed.

PS: I mentioned v4.5.1 but the problem also exists on v4.6.0

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageAwaiting initial review and prioritizationv4#4488

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions