With evolving global privacy and ePrivacy regulations, justifying third-party network connections as "strictly necessary" often requires delaying execution until a user shows explicit intent to interact with the protected asset.
Currently, the plugin’s "delayed loading" option triggers on general page interaction (e.g., any scroll or click anywhere on the page). On pages where a form is lower down or secondary to the content, loading the hCaptcha API purely based on general page movement makes it difficult to justify as strictly necessary under strict compliance frameworks.
As compatibility across diverse form types can be difficult, a cascading fallback mechanism, according to what a specific integration or user experience considerations make possible, can be:
- hCaptcha Hover / Click: hCaptcha can load as a static facade, only replaced by a live version when a user interacts with it. I assume legally this is the best option, but it may not always be available or possible while maintaining a decent user experience. Also, it isn't relevant for invisible implementation.
- Submit Button Hover/Click: Intercepting the submission, loading the API, fetching the token, and then releasing/continuing the form submission flow.
- Form Focus / Input: Triggered when the user focuses or inputs text into the first field of a form.
- Form Hover / Pointer Move: Triggered when a cursor enters the form wrapper bounding box (offering a pre-fetch buffer).
Answer to implementation questions requested in the forum:
The form/plugin/integration needed for:
- Primary immediate use case is Jetpack Forms, but the framework should ideally be generic enough to apply via developer selectors or targeted hooks for other standard integrations over time.
Which exact user action should trigger loading:
What should happen if the user submits before hCaptcha has finished loading:
-
If a user manages to click the submit button before the API script is fully loaded and executed, the submission event should be intercepted/paused. A loading spinner can be shown natively over the button while the hCaptcha API initializes, obtains the token, and then programmatically refires or resumes the submission flow.
-
Whether a developer hook/filter would be acceptable:
For my specific case, yes, absolutely. I assume allowing a wider audience to improve their privacy compliance with such a feature will require a UI configuration.
Thanks again, and let me know if more information is needed.
With evolving global privacy and ePrivacy regulations, justifying third-party network connections as "strictly necessary" often requires delaying execution until a user shows explicit intent to interact with the protected asset.
Currently, the plugin’s "delayed loading" option triggers on general page interaction (e.g., any scroll or click anywhere on the page). On pages where a form is lower down or secondary to the content, loading the hCaptcha API purely based on general page movement makes it difficult to justify as strictly necessary under strict compliance frameworks.
As compatibility across diverse form types can be difficult, a cascading fallback mechanism, according to what a specific integration or user experience considerations make possible, can be:
Answer to implementation questions requested in the forum:
The form/plugin/integration needed for:
Which exact user action should trigger loading:
What should happen if the user submits before hCaptcha has finished loading:
If a user manages to click the submit button before the API script is fully loaded and executed, the submission event should be intercepted/paused. A loading spinner can be shown natively over the button while the hCaptcha API initializes, obtains the token, and then programmatically refires or resumes the submission flow.
Whether a developer hook/filter would be acceptable:
For my specific case, yes, absolutely. I assume allowing a wider audience to improve their privacy compliance with such a feature will require a UI configuration.
Thanks again, and let me know if more information is needed.