Use the central Dialog for Campaign previews
This commit is contained in:
@@ -15,8 +15,10 @@ assert(
|
||||
"message previews expose their responsive backdrop hook"
|
||||
);
|
||||
assert(
|
||||
overlaySource.includes('type="button" className="modal-close" aria-label={closeLabel} title={closeLabel}'),
|
||||
"the close control has stable button semantics, an accessible name, and a tooltip"
|
||||
overlaySource.includes("<Dialog") &&
|
||||
overlaySource.includes("closeLabel={closeLabel}") &&
|
||||
overlaySource.includes('dataset.dialogStackState !== "topmost"'),
|
||||
"message previews use the central stacked Dialog with an accessible close label"
|
||||
);
|
||||
assert(
|
||||
styles.includes("height: min(780px, calc(100dvh - 48px));"),
|
||||
|
||||
@@ -103,7 +103,7 @@ for (const [key, english, german] of newTranslations) {
|
||||
const overlaySource = readFileSync("src/features/campaigns/components/MessagePreviewOverlay.tsx", "utf8");
|
||||
assert(overlaySource.includes("message-preview-backdrop"), "message previews expose a layout-specific responsive backdrop hook");
|
||||
assert(overlaySource.includes("{actions && <div"), "built-message footer actions remain in the stable shared preview footer");
|
||||
assert(overlaySource.includes('aria-label={closeLabel}'), "the preview close control has an accessible label");
|
||||
assert(overlaySource.includes("<Dialog") && overlaySource.includes("closeLabel={closeLabel}"), "the preview uses the central Dialog and its accessible close label");
|
||||
|
||||
const styles = readFileSync("src/styles/campaign-workspace.css", "utf8");
|
||||
assert(styles.includes("height: min(780px, calc(100dvh - 48px));"), "desktop previews use a stable responsive height");
|
||||
|
||||
Reference in New Issue
Block a user