fix: #3566950 Webform email_confirm and states

Closes #3566950

When an email confirmation element is conditionally required, Drupal adds the required attributes to the outer wrapper instead of the two email fields the user actually fills in. Screen readers therefore do not recognize those fields as required.

This change passes the required or optional state to both email fields, including negated conditions, while keeping all other states and validation behavior unchanged. It also adds regression coverage for the affected states and layouts.

Merge request reports

Loading
Loading