Comments (6)
Hmmm, the thing is, by specification design this is meant to be desirable behavior, however it's not entirely clear how one should approach this. Sure, we could use an overlay but Popovers don't really make the outer elements to be inert in contrast with Dialog.
My stance here is that I cannot change this by design, but I can recommend using alternatives. Frankly, if your component is a chat popup, I don't really recommend popovers.
from terracotta.
I didn't find the Popover pattern in https://www.w3.org/WAI/ARIA/apg/
Do you have a link that describe the pattern? It looks a little bit like the Tooltip pattern.
I use the Popover component for this action, it's perfect:
I'm new to the accessibility patterns so I don't have much experience with them. Do you have a pattern in mind for my use case.
Here is some screenshots of my interface for a users list and chat panels:
With what I read my use case may be more like a non-modal dialog, so I should use a role="alertdialog". I tried to use AlertDialog component without AlertDialogOverlay, but I didn't succeed to use the AlertDialog with a DisclosureButton.
I found this discussion sumup-oss/circuit-ui#1354 about a SidePanel component interesting.
It seems what I'm searching for is this behavior https://www.lightningdesignsystem.com/components/panels/
from terracotta.
Here's an example implementation: https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/datepicker-dialog.html
Popovers are actually under Dialog specification with a minor difference that is, unlike Dialogs, Popovers do not prevent the users from interacting outside the container. Popovers are closer to tooltips than to floating containers, which aren't actually dialogs. The purpose of dialogs is to lock the focus of the user inside the containers.
Panels are actually under dialogs, however I do think that accessibility-wise, panels doesn't fit your use case.
from terracotta.
The main action in my app is to move an avatar in a 3d environment. It would need footstep sounds and sound on wall collision to be accessible but that's another story. The chat panel is a secondary action.
To me it seems Popover has everything I want aria-expanded, aria-controls, focus. The chat panel can close if I click outside of it and continue moving my avatar, I can be fine with that. For a screen reader, the user will need to close the chat panel anyway to be able to continue moving the avatar from what I understand. It's just that it currently closes when you click somewhere inside the popover that is not a focusable element, so here when the input lose focus, that's the main issue I have. The datepicker example doesn't have this behavior, you can focus a button and click inside the popover to unfocus the selected button, it doesn't close.
from terracotta.
You can reproduce the issue in the popover example https://codesandbox.io/s/github/LXSMNSYC/solid-headless/tree/main/examples/popover-example
If you click on the thin border/padding of the popover it closes. I think it shouldn't close.
from terracotta.
Yeah that's probably an issue, I'll take a look
from terracotta.
Related Issues (20)
- Combobox HOT 6
- Popover transition enter doesn't work. HOT 3
- Missing `Tab.Panels` component HOT 4
- Issue when using solid-headless with Astro HOT 5
- Modal allows background text selection & scroll HOT 6
- Usage with Islands? HOT 6
- Can you add some installation instructions please? HOT 1
- `HTMLElement is not defined` when using SSR, render function & `createResource` HOT 1
- Do you have alternative for headlessUI Switch? HOT 1
- Can we have example for select please? HOT 1
- Menu components that are difficult to understand
- Hide PopoverPanel on href/link click HOT 1
- createUniqueId in Toaster causes issues with solid-start HOT 6
- listbox with multiple prop unable to unselect option HOT 1
- What do I use instead of Fragment? HOT 1
- Add docs please, trying to add checkbox, nothing gets shown HOT 2
- Can't use with solid start HOT 6
- 1.0 release
- TypeError: Cannot read properties of undefined (reading 'matches') HOT 2
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 terracotta.