fix: react-doctor modal/dialog/dropzone a11y — 18 files to role+tabIndex+onKeyDown or dialog

This commit is contained in:
Nora
2026-06-26 03:20:10 -06:00
parent e3c1295e62
commit d0bfec9d36
90 changed files with 747 additions and 408 deletions
+8 -3
View File
@@ -228,6 +228,8 @@ export default function ContactImportForm({ brandId }: { brandId: string }) {
const seenEmails = new Set<string>();
const seenPhones = new Set<string>();
const entries: ContactImportEntry[] = [];
const headerIndex = new Map<string, number>();
headers.forEach((h, i) => headerIndex.set(h, i));
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
@@ -235,8 +237,8 @@ export default function ContactImportForm({ brandId }: { brandId: string }) {
const ignored: Record<string, string> = {};
for (const mapping of effective) {
const colIdx = headers.indexOf(mapping.csvColumn);
if (colIdx === -1) continue;
const colIdx = headerIndex.get(mapping.csvColumn);
if (colIdx === undefined) continue;
const raw = row[colIdx] ?? "";
if (mapping.field === null) {
@@ -266,7 +268,10 @@ export default function ContactImportForm({ brandId }: { brandId: string }) {
break;
case "tags":
entry.tags = raw
? raw.split(/[;:,]/).map((t) => t.trim()).filter(Boolean)
? raw.split(/[;:,]/).flatMap((t) => {
const trimmed = t.trim();
return trimmed ? [trimmed] : [];
})
: undefined;
break;
case "email_opt_in":