Correctly add the WAI-ARIA attributes (see #6217)