Give MultiSelect chips accessible names and start creation fields empty.

Catalog chips now announce Select or Deselect so they are named for assistive tech. Method and value modals open blank; Generate draft inserts the catalog copy that used to be prefilled, and Customize still keeps the section headings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilalloandCursor committed 2026-09-29 15:59:00 -06:00
1 parent fd9f82ea19
commit 20ea4a2f30
35 files changed
+498 -156

No files matched your search

@@ -35,6 +35,10 @@ import {
conflictManagementPresetFor,
coreValuePresetFor,
decisionApproachPresetFor,
emptyCommunicationDetails,
emptyConflictManagementDetails,
emptyDecisionApproachTextFields,
emptyMembershipDetails,
membershipPresetFor,
} from "../../../../lib/create/finalReviewChipPresets";
import { isCustomMethodCardId } from "../../../../lib/create/isCustomMethodCardId";
@@ -1129,6 +1133,7 @@ export function FinalReviewChipEditModal({
<CoreValueEditFields
value={draft.value}
onChange={(value) => setDraft({ groupKey: "coreValues", value })}
generateDraft={coreValuePresetFor(target.overrideKey)}
/>
))}
{draft?.groupKey === "communication" &&
@@ -1156,6 +1161,7 @@ export function FinalReviewChipEditModal({
onChange={(value) =>
setDraft({ groupKey: "communication", value })
}
generateDraft={communicationPresetFor(target.overrideKey)}
/>
))}
{draft?.groupKey === "membership" &&
@@ -1183,6 +1189,7 @@ export function FinalReviewChipEditModal({
onChange={(value) =>
setDraft({ groupKey: "membership", value })
}
generateDraft={membershipPresetFor(target.overrideKey)}
/>
))}
{draft?.groupKey === "decisionApproaches" &&
@@ -1210,6 +1217,7 @@ export function FinalReviewChipEditModal({
onChange={(value) =>
setDraft({ groupKey: "decisionApproaches", value })
}
generateDraft={decisionApproachPresetFor(target.overrideKey)}
/>
))}
{draft?.groupKey === "conflictManagement" &&
@@ -1237,6 +1245,7 @@ export function FinalReviewChipEditModal({
onChange={(value) =>
setDraft({ groupKey: "conflictManagement", value })
}
generateDraft={conflictManagementPresetFor(target.overrideKey)}
/>
))}
</div>
@@ -1324,52 +1333,63 @@ function seedDraftForTarget(
switch (target.groupKey) {
case "coreValues": {
const saved = state.coreValueDetailsByChipId?.[target.overrideKey];
const preset = coreValuePresetFor(target.overrideKey);
if (saved) {
return {
groupKey: "coreValues",
value: {
meaning: saved.meaning,
signals: saved.signals,
...(saved.supportText ? { supportText: saved.supportText } : {}),
},
};
}
return {
groupKey: "coreValues",
value: {
meaning: saved?.meaning ?? preset.meaning,
signals: saved?.signals ?? preset.signals,
...(saved?.supportText ? { supportText: saved.supportText } : {}),
},
value: { meaning: "", signals: "" },
};
}
case "communication": {
const saved =
state.communicationMethodDetailsById?.[target.overrideKey] ??
communicationPresetFor(target.overrideKey);
return { groupKey: "communication", value: { ...saved } };
const saved = state.communicationMethodDetailsById?.[target.overrideKey];
return {
groupKey: "communication",
value: { ...(saved ?? emptyCommunicationDetails()) },
};
}
case "membership": {
const saved =
state.membershipMethodDetailsById?.[target.overrideKey] ??
membershipPresetFor(target.overrideKey);
return { groupKey: "membership", value: { ...saved } };
const saved = state.membershipMethodDetailsById?.[target.overrideKey];
return {
groupKey: "membership",
value: { ...(saved ?? emptyMembershipDetails()) },
};
}
case "decisionApproaches": {
const saved =
state.decisionApproachDetailsById?.[target.overrideKey] ??
decisionApproachPresetFor(target.overrideKey);
const saved = state.decisionApproachDetailsById?.[target.overrideKey];
const value = saved
? {
...saved,
applicableScope: [...saved.applicableScope],
selectedApplicableScope: [...saved.selectedApplicableScope],
}
: emptyDecisionApproachTextFields(
decisionApproachPresetFor(target.overrideKey),
);
return {
groupKey: "decisionApproaches",
value: {
...saved,
applicableScope: [...saved.applicableScope],
selectedApplicableScope: [...saved.selectedApplicableScope],
},
value,
};
}
case "conflictManagement": {
const saved =
state.conflictManagementDetailsById?.[target.overrideKey] ??
conflictManagementPresetFor(target.overrideKey);
const saved = state.conflictManagementDetailsById?.[target.overrideKey];
const value = saved
? {
...saved,
applicableScope: [...saved.applicableScope],
selectedApplicableScope: [...saved.selectedApplicableScope],
}
: emptyConflictManagementDetails();
return {
groupKey: "conflictManagement",
value: {
...saved,
applicableScope: [...saved.applicableScope],
selectedApplicableScope: [...saved.selectedApplicableScope],
},
value,
};
}
}