Open Jinksi opened 2 years ago
I had a quick look and we'll be able to figure out whether we are in the middle of saving the settings by using the isSaving
prop available in the useSettings
hook: https://github.com/Automattic/woocommerce-payments/blob/fecbe1cba9021c049df0d5d9b10e767cb152dbb3/client/data/settings/hooks.js#L368
I'm sending this to "Product Review" because we need to know exactly what we want to do while we are saving the settings. Disabling the checkboxes is one thing, but do we also need to adjust how they look (beyond the default styling)? What about accessibility (is disabling, thus losing the ability to focus the checkbox, a good thing? For instance, some thoughts in a link I found: here)
is disabling, thus losing the ability to focus the checkbox, a good thing?
@jbordonado That's a great point. We could consider using aria-disabled
which looks like it's designed for this exact use-case:
where elements need to be exposed as
disabled
but are still available for users to find when navigating via the Tab key. Doing so can improve their discoverability as they will not be removed from the focus order of the web page, as aria-disabled does not change the focusability of such elements
Can we use the same pattern used in WooCommerce core? If any changes are made to the form while the page is being saved and refreshed, they are erased. Seems like overkill to disable every input during the Submitting process.
Describe the bug
The Payments → Settings form and inputs remain editable while the submission form request is in progress. This could be confusing for users, especially if the request takes a while and the user makes changes during this time.
To Reproduce
Actual behavior
Screenshots
https://user-images.githubusercontent.com/3147296/189575825-1236f225-8aa6-47e7-aa02-9a7eaa464ba0.mov
Expected behavior
disabled
attribute in order to keep inputs navigable by keyboard.Desktop (please complete the following information):
Additional context