It appears that there is not a simple way of doing this. Looking around, I see 2 ways you could do something like this.
The first, and in my opinion less elegant way would be to inject HTML into the section’s description
parameter. You could then wire some JS to your custom HTML to make it work the way you want.
The second way you could do something like this would be by extending the builtin WP_Customize_Control
class to create a control that shows/hides another group of controls. Something like
class Expand_Other_Control extends WP_Customize_Control{
public $type="button";
protected $controlledElements = array();
public function __construct($manager, $id, $args = array()){
parent::construct($manager,$id,$args);
if( isset($args['settings']) ){
$this->controlledElements = $args['settings'];
//$this->settings may or may not be an array, we need it to be an array for our custom render function
is_array($this->controlledElements) or $this->controlledElements = array($this->controlledElements);
}
}
public function render_content(){
echo '<button class="expand" data-elements="'.json_encode($this->controlledElements).'>Expand '. $this->label . '</button>';
}
}
Then you would use it like this:
$wp_customize->add_control(
new Expand_Other_Control (
$wp_customize,
'your_setting_id',
array(
'label' => __( 'Button's Label' ),
'section' => 'your_section_id',
'settings' => 'your_setting(s)_id',
)
)
);
Please note, this is more of an off the cuff proof of concept. You would still need to create your own JS to make all of this work and this needs some modification and validation.