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
Migrate header search to a Stimulus controller (basic version) #9952
Conversation
Manage this branch in SquashTest this branch here: https://lb-featurestimulus-header-sear-zipx1.squash.io |
87f095b
to
338b70e
Compare
- Builds on wagtail#9952 - Partial progress on wagtail#9950
- Builds on wagtail#9952 - Partial progress on wagtail#9950
Thinking that Other name ideas; |
338b70e
to
4b63541
Compare
@thibaudcolas I have cleaned this up a bunch more - would love to get your initial pass on feedback for this when you get the chance. |
6327403
to
b54a838
Compare
@thibaudcolas I have updated this implementation to set aria-busy on the target container while 'loading', I opted out of setting aria-live="polite" on the elements though as it appears we have inconsistent header implementations so we end up with confusing screen reader output. Happy to fix this also but I think it may increase the scope of this PR, happy to raise a new issue once this is merged. Example (with aria-live)match results - works great as that uses a It also reads 'busy' if the screen reader has 'time'. no results - works great as that uses a clear search - does not work well at all, it reads the entire content (no h2) |
b54a838
to
d521591
Compare
- Builds on wagtail#9952 - Partial progress on wagtail#9950
@laymonage ok should be good for another review. I can do another smoke test for the aria-busy, I do recall (been a while) I had to slow down the voice read rate but I did validate that the screen reader correctly read out that the content had been updated. As for the legacy I still think it's not worth doing the upgrade notes as part of this PR though, I hope to get another PR done after this one which will remove ALL |
65c55d3
to
5756c17
Compare
- Builds on wagtail#9952 - Partial progress on wagtail#9950
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.
A few more things that I should've noticed earlier (sorry!), and some comments on the naming before we get this in (as it'll be harder to change later). Once those are resolved, I think this should be ready to be merged 😄
d4c8773
to
41c6b33
Compare
@laymonage ready for another round, thank you for taking the time to review this thoroughly. I feel like this is a really fine tuned approach now, let me know if anything stands out. |
b5a7108
to
5dc2363
Compare
- Builds on wagtail#9952 - Partial progress on wagtail#9950
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.
Looking very solid here, thanks for continuing to work on this! So happy to see all the controller code covered by tests. One small typo but I think that can be fixed as you merge this. (I can also merge if you want.)
Thanks again!
8f67a3a
to
025425e
Compare
- Removes the jQuery slide animation so content will be instantly replaced - Removes the autofocus behaviour on the search fields as this is not helpful for screen readers / keyboard control - Includes support for `window.header` if provided alongside dynamic adding of data-* attributes if not included - Base implementation for wagtail#9950 - Co-authored-by: sage <laymonage@gmail.com>
025425e
to
0d09e4a
Compare
Thank you @laymonage - I know it's a big job to review some of these PRs. I am excited to see us start to have a baseline of shared, reusable JS behaviours built with a similar approach... and unit tested :D |
- Builds on wagtail#9952 - Partial progress on wagtail#9950
- Builds on wagtail#9952 - Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content - Create a lazy version of `replace` and add unit tests for it - Partial progress on wagtail#9950
- Builds on wagtail#9952 - Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content - Create a lazy version of `replace` and add unit tests for it - Partial progress on wagtail#9950
- Builds on wagtail#9952 - Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content - Create a lazy version of `replace` and add unit tests for it - Partial progress on wagtail#9950
- Builds on wagtail#9952 - Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content - Create a lazy version of `replace` and add unit tests for it - Partial progress on wagtail#9950
- Builds on wagtail#9952 - Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content - Create a lazy version of `replace` and add unit tests for it - Partial progress on wagtail#9950
autofocus
behaviour on the search fields as this is not helpful for screen readers / keyboard controlaria-busy
attribute on the results container while loadingwindow.header
if provided