-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[popup] defaultopen expectations #609
Comments
similarly, if an auto popup were opened on page load via a |
In your example, why not use But the proposal of basically relegating more complicated use cases to popup="manual" seems reasonable, but I think then you might look at what the downsides of "manual" are, specifically that you then have to implement your auto-dismiss rules. Should manual be enhanced so that someone could opt-in to "auto" type dismiss rules, without actually being "auto"? Concretely what happens if you rewrite your implementation using "manual", do you lose out on functionality you otherwise get with "auto"? |
@tbondwilkinson I did mentioned that one resolution could be to ensure the
I would have implemented this example as a modal dialog due to its presentation and the above issues mentioned. |
The likelihood of people forgetting to add |
right. that's why i raised this issue as i think this may be a gap in what we wrote per this use case. again, autofocus may be the solution, maybe another. |
I think the proposal of having And this would I assume imply that people wanting to opt out would have |
yeh, i hesitate to think that autofocus needs to happen 100% of the time (outside of if - as you mentioned - |
This issue is quite related to #415, and in particular, #415 (comment). This entire issue would be moot if We're going to re-discuss #415 soon, so perhaps this issue should wait until that resolution. |
Since we just resolved to remove |
it was previously resolved that
defaultopen
wouldn't be supported forpopup=hint
, but was allowed for the other popup types.I'm concerned that there was a miss on this resolution in regards to
popup=auto
, as similar topopup=hint
, asauto
popups will very easily and regularly light dismiss if not very carefully implemented.see this example forked from Jhey's explainer. I've added a single link to the demo and when tabbing from the browser chrome into the demo, focus goes to the link, thus automatically dismissing the popup. If this popup contained interactive elements, then a keyboard user would not be able to get to it and would need to figure out what element in the page will re-invoke the popup. This content would be completely missed to someone using a screen reader.
I can recall that a use case for
popup=auto
being open by default was related to UI that i've seen where a search field's auto-suggestion popup was open on page load, and persisted until a user was able to navigate to the search field to interact with the UI. It would auto-dismiss after focus reached / left the search field, or if someone used esc key to dismiss, or mouse clicked / touched outside the popup to light dismiss it.But, now I'm wondering if this resolution needs to be revised as per my forked example, there needs to be more nuance to how an auto popup can be open by default in reality (e.g., if it was autofocused, then a keyboard user / someone using AT could actually get to the popup when encountering a real web page where there will be other focusable elements besides those within the popup / the popup's trigger). Otherwise,
defaultopen
may be a feature more practical forpopup=manual
.Thoughts?
cc @mfreed7 @jh3y @aleventhal
The text was updated successfully, but these errors were encountered: