GithubHelp home page GithubHelp logo

Comments (11)

simba77 avatar simba77 commented on June 9, 2024 3

As a temporary solution, you can add the aria-id attribute
<v-dropdown aria-id="some-dropdown">

from floating-vue.

Dodje avatar Dodje commented on June 9, 2024 1

I believe it's not a very good thing to generate id for every tooltip and dropdown manually..

from floating-vue.

Nuzzlet avatar Nuzzlet commented on June 9, 2024 1

Headless UI solved this problem with the new UseID function in Nuxt
This solution uses Nuxt's new UseID composable to generate an SSR safe ID.
The warning is caused by the latest version of Nuxt which improved hydration mismatch detection.

from floating-vue.

Nuzzlet avatar Nuzzlet commented on June 9, 2024 1

My soloution for the time being is this:

<script setup>
    const ariaId = useId()
</script>

<template>
    <VDropdown :aria-id="ariaId"  />
</template>

from floating-vue.

Akryum avatar Akryum commented on June 9, 2024

Yes you can use ariaId prop to prevent using a random id for the aria-describedby attribute.
Maybe it could be fixed in nuxt via the module but I'm not sure.

from floating-vue.

Akryum avatar Akryum commented on June 9, 2024

Also is this caused by popper that are already open when they are rendered on the server? For example with :shown="true"

from floating-vue.

jawngee avatar jawngee commented on June 9, 2024

from floating-vue.

sbittmann avatar sbittmann commented on June 9, 2024

in Nuxt3 I used

<ClientOnly>
    <template #fallback>
        <Item2Render />
    </template>
    <VTooltip>
        <Item2Render />
        <template #popper>
            <PopperContent />
        </template>
    </VTooltip>
<ClientOnly>

from floating-vue.

yoshrubin avatar yoshrubin commented on June 9, 2024

the above works for the ariaId issue but I am getting

 - rendered on server: tabindex=""
  - expected on client: tabindex="0"
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch. 
  at <VPopperContent ref="popperContent" popper-id="dropdown" theme="info-dropdown"  ... > 
  at <Popper ref="popper" theme="info-dropdown" referenceNode=null  ... > 
  at <Dropdown triggers= ['click'] skidding=-30 distance=25 > 

when using a Dropdown so the contents of the Popper are clickable

from floating-vue.

Mini-ghost avatar Mini-ghost commented on June 9, 2024

Yes you can use ariaId prop to prevent using a random id for the aria-describedby attribute. Maybe it could be fixed in nuxt via the module but I'm not sure.

This was useful for me, but it might not be the best approach as it causes the vuejs-accessibility's aria-props to throw errors at me. I wonder if there's another way to address this?

eslint-disable vuejs-accessibility/aria-props

from floating-vue.

max13h avatar max13h commented on June 9, 2024

the above works for the ariaId issue but I am getting

 - rendered on server: tabindex=""
  - expected on client: tabindex="0"
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch. 
  at <VPopperContent ref="popperContent" popper-id="dropdown" theme="info-dropdown"  ... > 
  at <Popper ref="popper" theme="info-dropdown" referenceNode=null  ... > 
  at <Dropdown triggers= ['click'] skidding=-30 distance=25 > 

when using a Dropdown so the contents of the Popper are clickable

Hey, same issue here

Did you found a solution to that please ?

from floating-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.