Add label or aria-label to fSelect facets’ search input field

<?php
add_action('facetwp_scripts', function () {
?>
    <script>
        FWP.hooks.addAction('facetwp/loaded', function() {

            /** adds aria-label to input */
            fUtil('.facetwp-type-fselect .fs-search input').each(function() {
                fUtil(this).attr('aria-label', 'this is the label');
            });

            /** prepends <label> and text to input  */

            // element that will be wrapped
            var el = document.querySelector('.facetwp-type-fselect .fs-search input');

            // create wrapper container
            var wrapper = document.createElement('label');

            // insert wrapper before el in the DOM tree
            el.parentNode.insertBefore(wrapper, el);

            // add label text
            wrapper.textContent = "This is the label";

        }, 1000);
    </script>
<?php
}, 100);