public function legend($text, $attr)
{
$attr = wp_parse_args($attr, array('id' => '', 'class' => ''));
$id = '' === $attr['id'] ? '' : ' id="' . esc_attr($attr['id']) . '"';
echo '<legend class="yoast-form-legend ' . $attr['class'] . '"' . $id . '>' . $text . '</legend>';
}