https://web.dev/more-capable-form-controls/ allows one to associate a custom element to a form as if it was a real input.