WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: quick question: label for text input in the middle ofa sentence


From: Jonathan Avila
Date: May 24, 2016 8:10AM

The choices for this situation seem to be
1. Just repeat the sentence for the accessible name without indicating where the blank is
2. Repeat the sentence in the accessible name but include some indication of where the blank is (but perhaps don't use the word blank as that could be confusing as screen readers say blank for spaces sometimes)
3. re-write the sentence in way that is understood with no blanks.

My recommendation for non-assessment forms such as government forms would be #3 to re-write the question in a way that can be understood without a blank.

For assessments this may invalidate the assessment -- so perhaps #2 is better. #1 is unclear to me as you don't know where the blank is and that is very important information.


Jonathan Avila
Chief Accessibility Officer
703.637.8957 (Office)

Visit us online: Website | Twitter | Facebook | Linkedin | Blog
Check out our Digital Accessibility Webinars!

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Mike Barlow
Sent: Saturday, May 21, 2016 9:15 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] quick question: label for text input in the middle of a sentence

Well you could also make use of a hidden span tag and using the aria-labelledby role for the input field:

CSS Styling for hiding the label for sighted users:
.hidden {

Here is the html content:
<span class="hidden" id="Question">Answer to the question what cheese is the moon made of?</span>

The moon is made of <input type="text" name="CheeseType"
aria-labelledby="Question" /> cheese

*Mike Barlow*
Web Application Developer
Web Accessibility/Section 508 SME

Lancaster, Pa 17601
Office: 732.835-7557
Cell: 732.682.8226

On Fri, May 20, 2016 at 12:38 PM, Brandon Keith Biggs < <EMAIL REMOVED> > wrote:

> Hello,
> Do the whole sentence, especially if the screen reader user can just
> hit tab to get to the next blank.
> That way the screen reader user does not need to hit any other buttons
> other than tab to move to the next sentence.
> Thanks,
> Brandon Keith Biggs <http://brandonkeithbiggs.com/>;
> On Fri, May 20, 2016 at 9:02 AM, Mike Warner < <EMAIL REMOVED> > wrote:
> > Hi all,
> >
> > maybe I'm not thinking straight today, since I got too little sleep,
> > but I'm unsure as to the best solution. We've got fill-in-the-blank
> exercises,
> > and the blank can appear anywhere in the sentence. Instead of
> > having a series of underscores and then the text input at the end,
> > we have the
> text
> > input right where the missing word goes. Everything works great,
> > and our students enjoy the layout, but I'm not sure where to put the
> > label for
> the
> > text input. The sentence could be as follows:
> >
> > The moon is made out of ____ cheese.
> >
> > Should the label tag be on the bit before, the blank, after the
> > blank, or on the whole sentence? I'm thinking that it should be the
> > whole
> sentence,
> > but my tired brain can't decide.
> >
> > Thanks!
> >
> > Mike
> >
> > Mike Warner
> > Director of IT Services
> > MindEdge, Inc.
> > > > > > archives at http://webaim.org/discussion/archives
> > > >
> > > archives at http://webaim.org/discussion/archives
> >