2

Business banking space. I have a very long form, broken into multiple sections, across several pages, with Save, etc.

We only support Eng and Fre as languages. But the business could be anywhere, so we can't assume one phone format.

Some pages of the form have yes/no questions that drive whole sub-sections to appear. eg. if you check 'I am in school' box, you will be required to fill out several more fields about your school. (This would occur on the same page, not a separate page).

I am mindful of the need to not mess with context for visually-impaired users.

Is it all right to have the subsection hidden or collapsed until the user checks the box, and then it expands? How will a screen reader deal with that?

1
  • Yes, hiding that content both user visually and for SR users is a requirement. Commented Jan 28, 2022 at 23:12

2 Answers 2

1

Yes, that's an ok pattern. You mentioned you didn't want to mess with context for visually-impaired users. That is true. However, you can change content and be ok.

With a checkbox that causes other stuff to appear, it's good to notify screen reader users that new information is now available. When a screen reader initially tabs through the interface to see what elements are there, the hidden stuff will obviously be skipped over. If they then tab to the checkbox and select it, they need to know something new is now on the page.

You can do this with a visually hidden aria-live region that you can populate with text. Something like:

<div class="visually-hidden" aria-live="polite"></div>

When the checkbox is selected, you'd update the <div> to

<div class="visually-hidden" aria-live="polite">Additional information is required for students</div>
0

@slugolicious's answer is great. Additional context is needed for the visually-hidden class. This class should not apply display: none to content. Instead it should reference CSS as shown here: https://stackoverflow.com/a/62109988/2120185

1
  • 2
    This should probably have been a comment to the other question (which I understand you do not have the necessary rep to do yet).
    – Nash
    Commented Mar 10, 2021 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.