'accessibility of one dynamic form compared to two forms

I have a question about the accessibility for visually impaired or blind people using forms on a page.

I have two forms that can be selected via a checkbox - let's call the checkboxes 'sales' & 'rent'. Is it better to:

  1. Have 2 forms in the page but only the 'sales' form shows for sighted people, but can be switched to the other form in the page by clicking the 'rent' checkbox.

    or

  2. Have the form being dynamic and only one form. So you have to manually click the 'sales' or 'rent' checkboxes to change the forms elements (form, inputs, selects, etc).

Which of the above is more accessible?



Solution 1:[1]

Both approaches can be made equally accessible. If you choose to have two forms, make sure that only one of the forms is visible to both the screen reader and the sighted users at the same time. To do this, make sure to hide the invisible form using display:none

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 unobf