-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix issue with closing dialog in the userbar #10934
Fix issue with closing dialog in the userbar #10934
Conversation
Manage this branch in SquashTest this branch here: https://lb-fix10924-ensure-dialog-clos-0gcfy.squash.io |
b531bec
to
018e216
Compare
- Remove `data-a11y-dialog-hide` and use Stimulus data action approach - This ensures that our code is more agnostic to the third party library and can leverage our own DialogController behaviour - Works around ally-dialog issue KittyGiraudel/a11y-dialog#582 - Fixes wagtail#10924
018e216
to
45c95ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks LB, if you have the time could you perhaps help review KittyGiraudel/a11y-dialog#589?
I'm not averse to these changes, but I don't know what Thibaud would prefer since I think it's possible that we can fix this just by updating a11y-dialog when a new version is released with that fix merged (assuming that happens in the near future)
@laymonage haha, oh man, OK I am not sure I can really review that PR easily, it's a bit beyond what I know and fully understand. Gave it a go this morning and maybe I'll have a chance to do a deep dive in the coming week or so. I agree we should get an third party fix, however, I would still think this PR makes sense as it removes our coupling with the external library in the HTML. The third party fix may still be required for things like Similar to tooltips, our Controller attributes are the HTML API and then the way the Controller behaves (third party library or not) is always the same. This way we can avoid changing our HTML each time we have to upgrade/change an underlying JS library. Anyway, I will try to get my head around that PR and see how I go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this and works well, thank you! As agreed on the core team meeting, we'd like to have this even when the issue in A11yDialog is fixed, because this makes better use of our Stimulus abstraction which can still work even if we swap the underlying library.
I'm not adding release notes as this is a regression in the main
branch.
Thank you Sage. |
data-a11y-dialog-hide
and use Stimulus data action approachbutton
attributes to align with the code styleguide