Context: How is the «Image Detail» popup implemented on the backend product view?
Magento_Catalog::catalog/product/helper/gallery.phtml
<div class="admin__field field-image-role">
<label class="admin__field-label">
<span><?php /* @escapeNotVerified */ echo __('Role')?></span>
</label>
<div class="admin__field-control">
<ul class="multiselect-alt">
<?php
foreach ($block->getMediaAttributes() as $attribute) :
?>
<li class="item">
<label>
<input class="image-type"
data-role="type-selector"
data-form-part="<?php /* @escapeNotVerified */ echo $formName ?>"
type="checkbox"
value="<?php /* @escapeNotVerified */ echo $block->escapeHtml(
$attribute->getAttributeCode()
) ?>"
/>
<?php /* @escapeNotVerified */ echo $block->escapeHtml(
$attribute->getFrontendLabel()
) ?>
</label>
</li>
<?php
endforeach;
?>
</ul>
</div>
</div>