Question Set: Use aria-live rather than setting focus

Description

For estimation, we should consider this risky, since we’ve struggled with it before

 

Background:

Currently the progress in the question set (“Question x of y“) is announced by setting focus to the qs-progress-announcer element. Setting focus to elements that aren’t visible is considered bad practice, as the visually-lost focus can confuse keyboard users and introduces more steps to navigating the site for them.

Additionally, setting focus to hidden elements has caused quite messy accessibility problems for us before, with the Question.read( ) function making content types completely unusable by keyboard (described here: )

Potential solution:

This was attempted fixed in , but time constraints and lacking relevancy to the scope of that issue made us go for a less drastic solution.

The pr introduces a new bug that sometimes reads “Question 1 of x“ twice when clicking the ‘retry’ button after answering all the questions and submitting. If that is solved, this would be a good solution.

Acceptance Criteria

1. qs-progress-announcer should be changed to use aria-live, instead of tabindex=-1 and focus( ) 2. "Question x of y" and potential feedback of that question should still be read when navigating between questions or clicking retry 3. The announcements should not be read twice

Activity

Gwen Tripet-Costet June 18, 2024 at 10:25 AM
Edited

Ok ok. I didn’t notice problems elsewhere before, I’ll recheck on a windows NVDA + Firefox combo takk
Edit: Works nice on firefox + NVDA yeah

Hanna Eide Solstad June 18, 2024 at 8:14 AM

We should not spend too much time on voiceover as NVDA + Firefox is the most “clean” reader. If it is completely silent on Mac that might be something that is worth investigating, but we should always test with NVDA + Firefox

Vilde Stabell June 17, 2024 at 10:26 AM

Voiceover strikes again

I’ll unassign myself so someone with easier access to voiceover can look into it

Gwen Tripet-Costet June 17, 2024 at 8:51 AM

Yep, I confirm what said. On mac with voiceover, it reads the “Question x of y” twice.

William Almnes June 17, 2024 at 6:48 AM

or , can one of you guys test this with VoiceOver since you have a Mac? Not sure if it’s just my VoiceOver that is acting weird, but I get the “Question x of y” read twice all the time.

Done

Details

Assignee

Reporter

Code reviewer

Tester

Times transitioned to development

2

Original estimate

Time tracking

11.42h logged

Sprint

Fix versions

Priority

Created October 18, 2023 at 8:31 AM
Updated June 18, 2024 at 10:44 AM
Resolved June 18, 2024 at 10:44 AM