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
Prevent refresh on enter in header search (documents and images) #8119
Conversation
Manage this branch in SquashTest this branch here: https://prevent-refresh-on-enter-1zus4.squash.io |
@rd3m |
Hi @lb-, yes, that's a much nicer solution. |
not for review - need to re-check keyboard and screen reader accessibility for this change |
8d6e8ef
to
ef00de6
Compare
- resolves wagtail#3746 - add a hidden & disabled first submit input so that ‘enter’ does not trigger submit - allow the behaviour of the actual submit button to still work as expected - intentionally HTML only solution as it is simpler and more accessible than JS override
ef00de6
to
13b1209
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.
Looks great @rd3m - thanks for taking the time to try out some different solutions.
Keyboard control still works when focused on the hidden button (the non-disabled one) and screen reader interaction still works.
Thanks for making your first contribution to Wagtail!
I have put your name on the changelog and contributors list as (Riley de Mestre) - please let me know if you would like your name listed differently.
Added changelog/pushed to remote branch. |
First contribution, very exciting, thanks @lb- ! |
* main: (31 commits) Removed outdated handling of length parameter to If-Modified-Since header styles - disable text-transform property-disallowed-list for required usage update @wagtail/stylelint-config-wagtail npm package disabled text-transform tailwind plugin removed redundant text-transform instances format readme with prettier Add some more dummy modules Add rule into upgrademodulepaths command for rewriting wagtail.tests imports Add some dummy modules for wagtail.tests Add a replacement rule into `wagtail updatemodulepaths` for the wagtail.core rename fix typo from wagtail#8119 prevent page refresh on enter key in header seach Add some more dummy modules for moved wagtail.core modules Update node installation instructions (wagtail#8154) Don't crash if wagtail/__init__.py is loaded without Django installed Add dummy modules to maintain wagtail.core imports Rename WagtailCoreAppConfig to WagtailAppConfig Move wagtail.core to wagtail Move tests to test Merge sites utilities into sites models ...
References issue #3746
make lint
from the Wagtail root) - yes