E-mail List Archives
Re: Form fields in a sentence
From: Birkir R. Gunnarsson
Date: Sep 7, 2023 1:06PM
- Next message: Kevin Prince: "Re: Providing accessible names with
" - Previous message: glen walker: "Re: Form fields in a sentence"
- Next message in Thread: None
- Previous message in Thread: glen walker: "Re: Form fields in a sentence"
- View all messages in this Thread
Aren't we over engineering the solution?
Isn't it simply to wrap "my favorite country is" and "my favorite
sport is" in label elements and associate with the inputs?
I mean input that says "my favorite country is" is pretty clearly
labeled, more conversational than I am used to, but there is no doubt
what information is expected of me.
I'd imagine the form is made conversational by design, maybe to make
the content more friendly or whatever.
That is not an accessibility decision, that is a content/UX decision.
the only thing we have to decide is whether the label of the input is
descriptive, making these sentence parts into labels passes that
criterion.
Are they a little bit overly wordy .. yeah, I'd say they are, but not
to the point where it is detrimental to the user experience.
On 9/7/23, glen walker < <EMAIL REMOVED> > wrote:
>>
>> Could the intervening text, "My favourite country is" and "and favourite
>> sport is", be given aria-hidden="true", leaving just the two fields
>> exposed
>> to AT? Would there be any downside to doing this? Or is it important that
>> the visible text is exposed? Or alternatively, should just "My", "is",
>> "and", and "is" have aria-hidden so that the text labels exposed to AT are
>> identical to the field names?
>>
>
> All four of those questions are "it depends". We don't have the context of
> what you're actually trying to convey. It might be important for the user
> to know they are filling in fields within a sentence (kind of a "mad libs"
> type of input, https://en.wikipedia.org/wiki/Mad_Libs) or it might not
> matter and just knowing there's an input field with a label is sufficient.
>
>
>> Another question is, if I make "favourite country" and "favourite sport"
>> bold to support voice activation users, would that pass WCAG SC 2.5.3
>> Label
>> in Name in your opinion?
>>
>
> If "favourite <whatever>" is bold, implying that it's the label for the
> field, then as long as "favourite <whatever>" is in the accessible name, it
> passes 2.5.3. You can have other stuff in the accessible name in addition
> to the "favourite <whatever>".
>
> From an implementation side, you could also have something like this:
>
> My <label for="country"> favourite country</label> is <input id="country">
>
> and then style the <label> so it's bold. That also gives the mouse user the
> benefit of clicking on the bold text and it moves the focus into the field.
> > > > >
--
Work hard. Have fun. Make history.
- Next message: Kevin Prince: "Re: Providing accessible names with
" - Previous message: glen walker: "Re: Form fields in a sentence"
- Next message in Thread: None
- Previous message in Thread: glen walker: "Re: Form fields in a sentence"
- View all messages in this Thread