Skip to content

Comments

Remove auto-focus to avoid screenreader interruption#124

Open
rileyodonnelld2l wants to merge 1 commit intomasterfrom
fix/HFP-4090-screenreader-skip-fix
Open

Remove auto-focus to avoid screenreader interruption#124
rileyodonnelld2l wants to merge 1 commit intomasterfrom
fix/HFP-4090-screenreader-skip-fix

Conversation

@rileyodonnelld2l
Copy link

@rileyodonnelld2l rileyodonnelld2l commented Mar 6, 2025

https://h5ptechnology.atlassian.net/browse/HFP-4090
This PR deals with an issue where screenreaders are cut off when reading the correct answer of incorrectly answered flashcard.

The cause of this issue is a fixed 3500ms timeout that focuses on the input of the next flashcard after answering the current flashcard. Since the focus is set explicity, the screenreader stops any text currently being read and immediately reads the newly focused element, as it should from a UX perspective. There are three possible solutions to this issue that I can think of:

  1. Remove the auto-focus, meaning the user would need to tab into the input of the new card after the transition.
  2. Set the timeout length to be dependent on the length of the answer text (ie. answer.length * someFactor). Note this variance in timeout length would exist for all users, not just screenreader users.
  3. Instead of auto-transitioning to next flashcard after answering, make the user explicitly navigate to the next arrow button to move to the next flashcard.

This PR implements solution 1. as it's the least disruptive to the current behaviour. Please feel free to comment on this PR if you feel there's a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant