Comments (6)
Hey there.
I can’t speak for vue-a11y-dialog
, but the way it works on react-a11y-dialog is that it renders the dialogs in a separate container from the app root through a React portal. Therefore these containers’ aria-hidden
can safely be toggled: one is hidden, not the other.
<Dialog appRoot='#app-root' dialogRoot='#dialog-root' {...otherConfigProps} />
<div id="app-root" />
<div id="dialog-root" />
from vue-a11y-dialog.
"#app" is in Vue's documentation and examples very often the overall wrapping container, so even when you are using PortalVue (see my blog post above) the following open modal would render the whole app inert:
<div id="app">
<div id="wrapper">
<portal to="modals">
<a11y-dialog app-root="#app">
<!-- ... -->
</a11y-dialog>
</portal>
</div>
<portal-target name="modals"></portal-target>
</div>
from vue-a11y-dialog.
@hugogiraudel Thanks for the explanation!
I think we can still achieve the same effect with PortalVue, there is some documentation for rendering a portal outside of a Vue application. I'll do some prototyping with it and see if that works :)
from vue-a11y-dialog.
Just some updates here. I did some prototyping and generally this seems to work. However, the API (targetEl
) to render a portal outside of a Vue application comes with its own issues making this as of now not ready to be implemented without major workarounds.
The library author is aware of these issues and plans to rework the API with the next release for PortalVue. I don't know when that is scheduled though.
I will follow the development of PortalVue and consider releasing a new version of vue-a11y-dialog
with some workarounds to at least address the accessibility issues.
from vue-a11y-dialog.
For reference: LinusBorg/portal-vue#164
from vue-a11y-dialog.
I've just published a fix for this :)
from vue-a11y-dialog.
Related Issues (16)
- <router-link> not working inside dialog content. HOT 2
- Vue i18n functions not available inside dialog HOT 1
- odd issue with dialog root element not existing HOT 3
- vue-a11y-dialog not working in MS Edge HOT 5
- IE11 issue HOT 1
- aria-labelledby is missed if titleId property is not specified HOT 2
- Version 1.0.0 seems to be broken: a._self in render function is undefined HOT 7
- Migrate to version 7 of a11y-dialog HOT 13
- Add an event that fires on close
- 1.1.0 build issue from esm HOT 6
- Alert dialog overlay HOT 4
- Can you provide types?
- Dialog title implementation and README example mismatched HOT 2
- issue rendering two dialogs on the same page. HOT 10
- remarks on implementation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-a11y-dialog.