-
Notifications
You must be signed in to change notification settings - Fork 64
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
For modal use :target instead of :focus #2
Comments
Hi @una and @dominikwilkowski! I totally agree with @dominikwilkowski. PS: Thanks for you idea. I love it. ❤️ |
Hey @Haroenv! |
Yep, that's what I was saying. The version you posted does work, while the one on the site doesn't yet. |
@Haroenv oops, sorry … |
marcysutton
pushed a commit
to marcysutton/YouMightNotNeedJS
that referenced
this issue
Oct 13, 2016
marcysutton
pushed a commit
to marcysutton/YouMightNotNeedJS
that referenced
this issue
Oct 13, 2016
marcysutton
pushed a commit
to marcysutton/YouMightNotNeedJS
that referenced
this issue
Oct 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Una,
Love this effort. Thanks for putting some work into this.
My suggestion for the modal is to use
:target
instead of:focus
as it also moves the focus to the open modal (important for a11y) and is arguably more stable.A trick here is to use the close button to target the original open button as well so focus is also returned to the original element.
Happy to do a PR if you're interested.
Cheers
The text was updated successfully, but these errors were encountered: