Take a look at this implementation:
https://github.com/wikimedia/mediawiki/blob/master/includes/specials/SpecialComparePages.php#L89-L100
Switching it to OOUI should generate an output like:
but instead creates empty elements for the hidden fields:
(see the three elements, one is marked)