Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

feat(web): some UX improvements in signin and password forms

Mohamed Bassemb4b947401bf6
diff --git a/apps/web/components/settings/ChangePassword.tsx b/apps/web/components/settings/ChangePassword.tsx
index 5111295c..8513596e 100644
--- a/apps/web/components/settings/ChangePassword.tsx
+++ b/apps/web/components/settings/ChangePassword.tsx
@@ -89,6 +89,7 @@ export function ChangePassword() {
<Input
id="current-password"
type={showCurrentPassword ? "text" : "password"}
+ autoComplete="current-password"
placeholder={t("settings.info.current_password")}
className="h-11 pr-10"
{...field}
@@ -99,6 +100,10 @@ export function ChangePassword() {
variant="ghost"
size="sm"
className="absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent"
+ aria-label={
+ showCurrentPassword ? "Hide password" : "Show password"
+ }
+ aria-controls="current-password"
onClick={() => setShowCurrentPassword(!showCurrentPassword)}
>
{showCurrentPassword ? (
@@ -130,6 +135,7 @@ export function ChangePassword() {
<Input
id="new-password"
type={showNewPassword ? "text" : "password"}
+ autoComplete="new-password"
placeholder={t("settings.info.new_password")}
className="h-11 pr-10"
{...field}
@@ -140,6 +146,10 @@ export function ChangePassword() {
variant="ghost"
size="sm"
className="absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent"
+ aria-label={
+ showNewPassword ? "Hide password" : "Show password"
+ }
+ aria-controls="new-password"
onClick={() => setShowNewPassword(!showNewPassword)}
>
{showNewPassword ? (
@@ -170,6 +180,7 @@ export function ChangePassword() {
<Input
id="confirm-password"
type={showConfirmPassword ? "text" : "password"}
+ autoComplete="new-password"
placeholder={t("settings.info.confirm_new_password")}
className="h-11 pr-10"
{...field}
@@ -180,6 +191,10 @@ export function ChangePassword() {
variant="ghost"
size="sm"
className="absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent"
+ aria-label={
+ showConfirmPassword ? "Hide password" : "Show password"
+ }
+ aria-controls="confirm-password"
onClick={() =>
setShowConfirmPassword(!showConfirmPassword)
}
@@ -199,7 +214,7 @@ export function ChangePassword() {
<div className="flex justify-end">
<ActionButton type="submit" loading={mutator.isPending}>
- {t("actions.save")}
+ {t("settings.info.change_password")}
</ActionButton>
</div>
</form>
diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsx
index 0ff5b1d0..46bffc3d 100644
--- a/apps/web/components/signin/CredentialsForm.tsx
+++ b/apps/web/components/signin/CredentialsForm.tsx
@@ -111,6 +111,8 @@ export default function CredentialsForm() {
<FormControl>
<Input
type="email"
+ autoComplete="email"
+ spellCheck={false}
placeholder="Enter your email"
{...field}
/>
@@ -129,6 +131,7 @@ export default function CredentialsForm() {
<FormControl>
<Input
type="password"
+ autoComplete="current-password"
placeholder="Enter your password"
{...field}
/>