Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-4288] fix: auth page tab index (#7189)

Anmol Singh Bhatia531748dcc303
diff --git a/space/core/components/account/auth-forms/email.tsx b/space/core/components/account/auth-forms/email.tsx
index f0b88407a8..97f7c7b67b 100644
--- a/space/core/components/account/auth-forms/email.tsx
+++ b/space/core/components/account/auth-forms/email.tsx
@@ -40,7 +40,7 @@ export const AuthEmailForm: FC<TAuthEmailForm> = observer((props) => {
const isButtonDisabled = email.length === 0 || Boolean(emailError?.email) || isSubmitting;
- const [isFocused, setIsFocused] = useState(true)
+ const [isFocused, setIsFocused] = useState(true);
const inputRef = useRef<HTMLInputElement>(null);
return (
@@ -54,9 +54,12 @@ export const AuthEmailForm: FC<TAuthEmailForm> = observer((props) => {
`relative flex items-center rounded-md bg-onboarding-background-200 border`,
!isFocused && Boolean(emailError?.email) ? `border-red-500` : `border-onboarding-border-100`
)}
- tabIndex={-1}
- onFocus={() => {setIsFocused(true)}}
- onBlur={() => {setIsFocused(false)}}
+ onFocus={() => {
+ setIsFocused(true);
+ }}
+ onBlur={() => {
+ setIsFocused(false);
+ }}
>
<Input
id="email"
@@ -70,14 +73,18 @@ export const AuthEmailForm: FC<TAuthEmailForm> = observer((props) => {
autoFocus
ref={inputRef}
/>
- {email.length > 0 && (
- <XCircle
- className="h-[46px] w-11 px-3 stroke-custom-text-400 hover:cursor-pointer text-xs"
+ {email.length > 0 && (
+ <button
+ type="button"
+ aria-label="Clear email"
onClick={() => {
setEmail("");
inputRef.current?.focus();
}}
- />
+ tabIndex={-1}
+ >
+ <XCircle className="h-[46px] w-11 px-3 stroke-custom-text-400 hover:cursor-pointer text-xs" />
+ </button>
)}
</div>
{emailError?.email && !isFocused && (
@@ -92,4 +99,4 @@ export const AuthEmailForm: FC<TAuthEmailForm> = observer((props) => {
</Button>
</form>
);
-});
\ No newline at end of file
+});
diff --git a/web/core/components/account/auth-forms/email.tsx b/web/core/components/account/auth-forms/email.tsx
index 9f3129364e..78b26b4c6c 100644
--- a/web/core/components/account/auth-forms/email.tsx
+++ b/web/core/components/account/auth-forms/email.tsx
@@ -55,7 +55,6 @@ export const AuthEmailForm: FC<TAuthEmailForm> = observer((props) => {
`relative flex items-center rounded-md bg-onboarding-background-200 border`,
!isFocused && Boolean(emailError?.email) ? `border-red-500` : `border-onboarding-border-100`
)}
- tabIndex={-1}
onFocus={() => {
setIsFocused(true);
}}
@@ -84,6 +83,7 @@ export const AuthEmailForm: FC<TAuthEmailForm> = observer((props) => {
}}
className="absolute right-3 size-5 grid place-items-center"
aria-label={t("aria_labels.auth_forms.clear_email")}
+ tabIndex={-1}
>
<XCircle className="size-5 stroke-custom-text-400" />
</button>