Using input_attrs() Multiple Times Within One Customizer Control

You shouldn’t need to call the input_attrs() method directly. Instead, rely on the add_control() method of the wordpress customizer object to generate the html inputs for your customizer settings. The add_control() method takes as its second argument an array of properties that allows you to set the label for the input, the section of the customizer where the input will be found, the type of input (text, checkbox, <select>, etc.), and more. A complete list of properties you can set via the second argument of add_control() can be found here. One of them is input_attrs. If you pass this property an array of name/value pairs, add_control() will include them as custom attributes and values on the html inputs it generates.

As a loose example of what this might look like when you put it all together:

add_action( 'customize_register', 'mytheme_customize_register');

function mytheme_customize_register( $wp_customize ) {
   
    $wp_customize->add_setting( 'mytheme_mysetting', array(
        'default' => '',
        'sanitize_callback' => 'sanitize_text_field'
    ) );
    
    $wp_customize->add_control( 'mytheme_mysetting', array(
        'label' => __( 'My website user of the month', 'mytheme-textdomain' ),
        'type' => 'text',
        'section' => 'mysection',
        'input_attrs' => array(
          'my-custom-attribute-name' => 'my custom attribute value',
          'foo' => 'bar'
        )
    ));
}