feat: add accessibility support for password toggle

Enhances password input component with proper accessibility attributes including role, label, hint, and state to improve screen reader experience.

Adjusts minimum height handling for Android platform compatibility in list items and replaces Tailwind classes with inline styles for gesture control settings to ensure consistent styling across platforms.

Adds translation keys for password visibility toggle functionality.
This commit is contained in:
Uruk
2025-09-01 23:19:12 +02:00
parent a93b935df3
commit 4b2fcee460
4 changed files with 23 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
import { Ionicons } from "@expo/vector-icons";
import type { PropsWithChildren, ReactNode } from "react";
import { TouchableOpacity, View, type ViewProps } from "react-native";
import { Platform, TouchableOpacity, View, type ViewProps } from "react-native";
import { Text } from "../common/Text";
interface Props extends ViewProps {
@@ -34,9 +34,9 @@ export const ListItem: React.FC<PropsWithChildren<Props>> = ({
<TouchableOpacity
disabled={disabled}
onPress={onPress}
className={`flex flex-row items-center justify-between bg-neutral-900 min-h-[44px] pr-4 pl-4 ${
disabled ? "opacity-50" : ""
}`}
className={`flex flex-row items-center justify-between bg-neutral-900 ${
Platform.OS === "android" ? "min-h-12" : "min-h-[44px]"
} pr-4 pl-4 ${disabled ? "opacity-50" : ""}`}
{...(viewProps as any)}
>
<ListItemContent
@@ -54,9 +54,9 @@ export const ListItem: React.FC<PropsWithChildren<Props>> = ({
);
return (
<View
className={`flex flex-row items-center justify-between bg-neutral-900 min-h-[44px] pr-4 pl-4 ${
disabled ? "opacity-50" : ""
}`}
className={`flex flex-row items-center justify-between bg-neutral-900 ${
Platform.OS === "android" ? "min-h-12" : "min-h-[44px]"
} pr-4 pl-4 ${disabled ? "opacity-50" : ""}`}
{...viewProps}
>
<ListItemContent