Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FEC-14262): Player v7 | Quiz | Wrong first element focus on quiz questions overlay. #145

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

Tzipi-kaltura
Copy link
Contributor

@Tzipi-kaltura Tzipi-kaltura commented Dec 12, 2024

Issue:
When question overlay is opened, focus is not moved to first element in the overlay.

Root cause:
tabindex=0 was removed from legend element since it's not an interactive element.

Fix:
Move the focus to first interactive element in the overlay instead of to legend element.

Solves FEC-14262

@@ -72,8 +72,12 @@ export const QuizQuestionWrapper = withText(translates)((props: QuizQuestionWrap
useEffect(() => {
setSelected(getSelected(qui));
setIsLoading(false);
if(qui.q.questionType === KalturaQuizQuestionTypes.Reflection){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use condition:

      if (qui.a || qui.q.questionType === KalturaQuizQuestionTypes.Reflection) {
        continueButtonRef.current?.focus();
      }

to avoid duplication of continueButtonRef.current?.focus();

@Tzipi-kaltura Tzipi-kaltura merged commit d248189 into master Dec 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants