From b4f10137a8eac2df62672003f5d537c7869f3150 Mon Sep 17 00:00:00 2001 From: joyal007 Date: Tue, 3 Oct 2023 20:35:02 +0530 Subject: [PATCH] keyboard usablity --- .../surveys/src/components/BackButton.tsx | 4 +++- .../surveys/src/components/CTAQuestion.tsx | 4 +++- .../src/components/FormbricksSignature.tsx | 1 + .../MultipleChoiceMultiQuestion.tsx | 23 ++++++++++++++----- .../MultipleChoiceSingleQuestion.tsx | 21 +++++++++++++---- .../surveys/src/components/NPSQuestion.tsx | 12 ++++++++-- .../src/components/OpenTextQuestion.tsx | 19 +++++++++++++-- .../surveys/src/components/RatingQuestion.tsx | 10 ++++---- .../surveys/src/components/SubmitButton.tsx | 22 +++++++++++++++++- 9 files changed, 94 insertions(+), 22 deletions(-) diff --git a/packages/surveys/src/components/BackButton.tsx b/packages/surveys/src/components/BackButton.tsx index 25181a5801..a031cb46bc 100644 --- a/packages/surveys/src/components/BackButton.tsx +++ b/packages/surveys/src/components/BackButton.tsx @@ -3,11 +3,13 @@ import { cn } from "../../../lib/cn"; interface BackButtonProps { onClick: () => void; backButtonLabel?: string; + tabIndex?: number; } -export function BackButton({ onClick, backButtonLabel }: BackButtonProps) { +export function BackButton({ onClick, backButtonLabel, tabIndex = 2 }: BackButtonProps) { return (