WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: - Checkbox with text box to specify

for

From: glen walker
Date: May 26, 2023 11:36AM


Those are two nice resources but they don't directly address associating
input fields with a checkbox, which I think is the original question.

Here's another resource that might be closer:
https://adrianroselli.com/2021/12/under-engineered-dependency-questions.html

It talks about unhiding form elements (text input or other checkboxes) when
an "other" radio button is selected. I don't think you are unhiding your
input but the concept is similar.

I'm guessing your two checkboxes are already grouped together? Either via
a fieldset/legend or role="group"?

You could have a nested fieldset or group around your checkbox and input
field but that might not be necessary. If the checkbox label is "other,
specify" and the input field is next in the tab order *and* the input field
has an appropriate accessible name (such as "specify other [whatever]"),
then you should be ok.


On Fri, May 26, 2023 at 9:55 AM Hayman, Douglass < <EMAIL REMOVED> >
wrote:

> Have you looked at examples offered here:
>
> https://dequeuniversity.com/library/
>
> And also the webaim site has great information:
> https://webaim.org/techniques/forms/
>
>
>