Skip to content

Commit 3175faa

Browse files
Copilotjaseel0
andcommitted
fix: restore aria-label and use SUPPORTED_LANGUAGES in SearchInput
- Restore the aria-label attribute on the language select element (removed in PR #92, reducing accessibility) - Replace the duplicate inline languages array with SUPPORTED_LANGUAGES from constants (single source of truth) Co-authored-by: jaseel0 <225665919+jaseel0@users.noreply.github.com> Agent-Logs-Url: https://github.com/BeyteFlow/ReadmeGenAI/sessions/486edd1a-2457-4589-b5e2-b61f6dfde55f
1 parent cc5e850 commit 3175faa

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

src/components/Generator/SearchInput.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@ export const SearchInput = ({
2929
const [language, setLanguage] = useState("English");
3030
const [error, setError] = useState<string | null>(null);
3131

32-
const languages = [
33-
"English",
34-
"Spanish",
35-
"French",
36-
"German",
37-
"Chinese",
38-
"Japanese",
39-
"Korean",
40-
"Portuguese",
41-
"Russian",
42-
"Arabic",
43-
"Turkish",
44-
];
45-
4632
const handleSubmit = (e: React.FormEvent) => {
4733
e.preventDefault();
4834
setError(null);
@@ -86,9 +72,10 @@ export const SearchInput = ({
8672
<select
8773
value={language}
8874
onChange={(e) => setLanguage(e.target.value)}
75+
aria-label="Select language for README generation"
8976
className="bg-zinc-900/50 border border-white/10 rounded-2xl px-6 py-6 text-white focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all backdrop-blur-xl appearance-none cursor-pointer min-w-[140px]"
9077
>
91-
{languages.map((lang) => (
78+
{SUPPORTED_LANGUAGES.map((lang) => (
9279
<option
9380
key={lang}
9481
value={lang}

0 commit comments

Comments
 (0)