Toward the upper right of the browser window, an application displays the message "Your session will expire in NN minutes". This message changes once per minute while there is no activity. When there is less than a minute left, it changes to "NN seconds" and, naturally, changes once a second. When the user's interactions send a new request to the server, NN is reset to 30.
Do screenreader users want an audible alert every time this changes (a) each minute, (b) each second, (c) on reset to 30? I don't know where the general preference lies between "I need to know how much time I have left before I lose my session" and "this is really distracting".
WCAG 2.2.2 provides "For any auto-updating information that (1) starts automatically and (2) is presented in parallel with other content, there is a mechanism for the user to pause, stop, or hide it or to control the frequency of the update unless the auto-updating is part of an activity where it is essential." That seems like it's geared more toward unpredictable updates like when a new entry appears in a live news stream in a sidebar that's tangential to the user's use of the page than in a timer where the whole point is that the user needs an up-to-date indication of how much time is left. Is this provision applicable here? I guess if we gave a screenreader user the means to stop it, that would resolve my first question, above. Either way, I'm not sure that this more useful to a visual user than it is a waste of screen space. What do you think?
UPDATE: This question was closed for being "opinion-based". I'm trying to comply with accessibility guidelines. Sure people will have opinions as to how best to do that, but this site is filled with people giving their opinions about how best to do this or that: "No, don't do it that way, it violates the principle of something-or-other." "You should do it this way because it's more semantic." The bottom line is that this is a technical question and I need to comply with the published guidelines. I'm astounded that somebody has decided that I'm not supposed to do that here.
I don't think SC 2.2.2 applies here. There is an exception for "essential" information, and knowing when your session is going to expire would fall under that exception. The SC that really applies here is 4.1.3 Status Messages, which requires that the message be implemented in a way that it can be picked up by screen readers automatically as it changes (usually through an ARIA live region).
As far as how often to announce these changes, it's going to depend on context and your users. For something like this, you might start with a long pause between announcements and then gradually decrease the pause as the session gets closer to expiring. For example, only force an announcement at 25, 20, 15, and 10 minutes. Then when it gets to 5 mins, force an announcement at 5, 4, 3, 2, and 1 minute. Under 1 minute, perhaps force an announcement at 30 seconds and 10 seconds. I would probably force an announcement every time the timer is reset to 30 minutes, as long as that doesn't happen so often to be annoying.
In order to do this correctly, you will most likely want to have a visually hidden ARIA live region where you can send these periodic messages to (and then you will want to remove the message from the live region after 5-10 seconds so that screen reader users don't accidentally stumble upon it). The visual message that is constantly changing would not be a live region.
Bottom line, there is no one right answer. How often you force an announcement for screen reader users is going to depend on the application and its users. But I think a safe bet is to err on the side of fewer announcements, especially when the expiration is a ways off. Screen reader users can manually check the time remaining too. It might be a good idea to create a region landmark for the expiration message, or give it a heading, so that screen reader users can navigate to it quickly if needed.