E-mail List Archives
Thread: single page app with language switching button
Number of posts in this thread: 4 (In chronological order)
From: Farough, David (CFP/PSC)
Date: Thu, Oct 01 2020 12:08PM
Subject: single page app with language switching button
No previous message | Next message →
Given the following scenario, what is the best way to cause a screen reader to switch languages appropriately?
We have a single page application that will allow a user to switch between English and French. There is a button which specifies French or English at the top of page.
The Language for the page is switched appropriately, but even after refreshing the screen Jaws does not use the correct synthesizer language. The only way to get this to occur is to reload the page.
This is true for both Jaws and NVDA using Chrome.
Any suggestions as to how to address this?
From: Steve Green
Date: Thu, Oct 01 2020 12:39PM
Subject: Re: single page app with language switching button
← Previous message | Next message →
I would say that you need to refresh the page, even if you don't want to. I know that one of the whole points of a single-page application is to avoid reloading pages, but this is a choice and it is completely unnecessary. You broke it, so you fix it. It's not as if people will be changing language very often, so it doesn't matter if the page reload takes a few seconds and looks a bit clunky.
I don't know if it would even be possible for you to force assistive technologies to refresh their virtual buffer or whatever else would be required to change the synthesizer language, but it seems like bad manners even if you can.
Sorry if this seems a bit harsh, but I am heartily sick of bad development choices manifesting themselves as accessibility problems, and then we're the bad guys for asking the developers to fix them. The use of a single-page application is never essential. It's a choice and it has consequences.
Steve Green
Managing Director
Test Partners Ltd
From: glen walker
Date: Fri, Oct 02 2020 9:28AM
Subject: Re: single page app with language switching button
← Previous message | Next message →
Steve's enthusiasm is always appreciated but just to lessen some of the
"harshness" most developers are not intentionally making websites
inaccessible. Most inaccessibility comes from ignorance of accessibility
principles or semantic html.
I'm not sure it's clear in the spec what should happen if you change the
language of the page (specified on the main <html> element). If a screen
screen reader does not update its buffer, is it an html developer's fault?
Usually "fault" doesn't matter when you're concerned with the user
experience. There are lots of accessibility issues caused by various
browser/screen reader combinations. They can often be coded around to make
the experience better. Some companies choose to work around the issue
making the experience better for the user but other companies choose to
stick with their technically correct code and wait for the browser or
screen reader to fix the problem. There are merits for both. For the
user, the former is obviously better but if we always code around problems,
sometimes the real underlying problem is never fixed. And if you code
around the problem and the browser and/or screen reader fixes the issue at
some point, sometimes the code around isn't as good as the resulting fix
and now you have to remember to back out the code change.
In this specific scenario, personally, I would verify the problem exists
with JAWS, NVDA, VoiceOver (Mac and iOS), and Talkback. Sounds like you
checked JAWS and NVDA. Then I would check the community forum for each of
those to see if anyone else has had this issue (kind of like you're doing
by posting here on WebAIM, but I would check the JAWS forum specifically,
and the NVDA forum specifically, etc). Then I would try to contact the
official support for each to see if they know about the problem. It might
be a simple fix on their end to flush the buffer when the language
changes. Who knows? And then as Steve mentioned, I would play with some
workarounds to force the page to reload. You could have a note with the
switch that says the page will "reload and possibly flash" when you switch
languages. Having the note visible and programmatically associated with
the switch would be ideal.
On Thu, Oct 1, 2020 at 12:39 PM Steve Green < = EMAIL ADDRESS REMOVED = >
wrote:
> I would say that you need to refresh the page, even if you don't want to.
> I know that one of the whole points of a single-page application is to
> avoid reloading pages, but this is a choice and it is completely
> unnecessary. You broke it, so you fix it. It's not as if people will be
> changing language very often, so it doesn't matter if the page reload takes
> a few seconds and looks a bit clunky.
>
> I don't know if it would even be possible for you to force assistive
> technologies to refresh their virtual buffer or whatever else would be
> required to change the synthesizer language, but it seems like bad manners
> even if you can.
>
> Sorry if this seems a bit harsh, but I am heartily sick of bad development
> choices manifesting themselves as accessibility problems, and then we're
> the bad guys for asking the developers to fix them. The use of a
> single-page application is never essential. It's a choice and it has
> consequences.
>
> Steve Green
> Managing Director
> Test Partners Ltd
>
>
>
From: Farough, David (CFP/PSC)
Date: Fri, Oct 02 2020 11:47AM
Subject: Re: single page app with language switching button
← Previous message | No next message
Thanks for your responses Glen and Steve.
To some extent, I agree with Steve that deciding to create a single page app was a choice and that there are consequences that follow from that choice. This was not my choice though, but it is up to me to insure that our users have the best experience possible given the circumstances.
I am an experienced screen reader user and am fully aware of the problems that can occur with these applications. I have had some experience with testing another single page application and I was surprised at how well it worked for me as a screen reader user. I was able to communicate to the developers what the problems would be and they were extremely responsive to the issues I raised.
I plan to create issues for Jaws and NVDA as you suggest Glen. I am not sure about Mobile users as I am not sure to what extent we expect to support Mobile.
At this point I am wondering how a screen reader could immediately detect a change of language in a Single page application.
What event or trigger could be used to check for a change of Language on the page? This would not happen very often, so to what degree would screen reader performance suffer as a result of checking for this.
I have to think that forcing a page load is the best option for this scenario.
Any other ideeas welcome
David Farough
Application Accessibility Co-ordinator,
Corporate IT Management
Public Service Commission of Canada/ Government of Canada
= EMAIL ADDRESS REMOVED =