Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #35812
| Subject | Re: Lang attribute on html element |
|---|---|
| Newsgroups | comp.lang.javascript |
| References | <C5mdnbpmv72Q13fGnZ2dnUU7-KfNnZ2d@westnet.com.au> |
| From | Andrew Poulos <ap_prog@hotmail.com> |
| Date | 2018-11-13 16:09 +1100 |
| Message-ID | <4LGdnXHeh6YRwXfGnZ2dnUU7-N-dnZ2d@westnet.com.au> (permalink) |
On 13/11/2018 2:50 pm, Andrew Poulos wrote: > I have a page that onload runs some JavaScript that sets a value for > lang on the html element. > > What concerns me is that if this is "too late" for screen readers to > correctly interpret the page's language. That is, does the appropriate > lang attribute need to be hard coded in the page for screen readers to > recognise it? > > Would using DOMContentLoaded be safer? After some testing, using DOMContentLoaded triggers Chrome to ask if I want the page translated so maybe it will also be picked up by screen readers. Andrew Poulos
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Lang attribute on html element Andrew Poulos <ap_prog@hotmail.com> - 2018-11-13 14:50 +1100
Re: Lang attribute on html element Andrew Poulos <ap_prog@hotmail.com> - 2018-11-13 16:09 +1100
Re: Lang attribute on html element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-11-13 22:40 +0100
Re: Lang attribute on html element Andrew Poulos <ap_prog@hotmail.com> - 2018-11-14 10:00 +1100
csiph-web