WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: can you make a native <select>/<option> honor the LANG attribute?

for

From: Steve Green
Date: Dec 17, 2020 2:22PM


Yes, I know that what I did wouldn't address your issue, but there will be other use cases where a "lang" attribute would be appropriate on the <select> element. I didn't put "lang" attributes on the <option> elements because we had already determined that this has no effect.

Steve


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of glen walker
Sent: 17 December 2020 21:10
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] can you make a native <select>/<option> honor the LANG attribute?

Thanks, Steve, but doesn't each item in the dropdown list need its own language since each represents a different language? It sounds like you put LANG on the <select> itself, which can only have one language and is the container for all the language choices. It's interesting that arrowing up/down through the list when its collapsed will honor the language but that would just be for the LANG on the <select>, right? Or did you put the LANG on all the <option> elements? (I could probably just try it instead of asking :-)).

On Thu, Dec 17, 2020 at 2:04 PM Steve Green < <EMAIL REMOVED> >
wrote:

> There is another curious twist. If you put a "lang" attribute on the
> <select> element, JAWS ignores it if you press the spacebar to open
> the list of options and arrow through them. However, if you go into
> forms mode and arrow through the options while the list is closed,
> JAWS does honour the "lang" attribute.
>
>