Information:

Additional aria added to legend to work around JAWS bug.

Original <h1> removed - relying only on aria role on legend.

<legend role="heading" aria-level="1"><span>...</span></legend>

Pressing H in this example should list headings in JAWS.

See https://github.com/FreedomScientific/VFO-standards-support/issues/549.

Are you 18 or over?

Results
Operating System Browser Assistive tech Notes Pass/fail
Windows 10 Chrome 94 JAWS 2021 Works as expected. Pressing INS+F5 to show all form fields demonstrates that JAWS is still maintaining the association between form fields and legends despite the `role="heading"`
Windows 10 Chrome 94 NVDA 2021.1

Pressing F to move to the radio buttons should announce "Are you 18 or over", before announcing the radios. Which it does.

If you press H to announce the main heading, and then F to move to the form field, it does not re-announce the legend. Is this ok? Assuming the h1 is worded like a question, people should make the connection between it and the subsequent yes/no questions?

Windows 10 Firefox NVDA 2021.1
Windows 10 IE11 NVDA 2021.1 Pressing F does not announce the legend first as it has in other browsers, but it does not do this in the reference example either so this is an existing deficiency of this browser.
Windows 10 Edge NVDA 2021.1
Android 10 Chrome 94 TalkBack
iOS 14.7.1 Safari Voiceover

Example markup lifted from https://service-manual.nhs.uk/design-system/components/fieldset