diff --git a/app/components/form/FullPageForm.tsx b/app/components/form/FullPageForm.tsx index 4df3205ba3..0fdb96b304 100644 --- a/app/components/form/FullPageForm.tsx +++ b/app/components/form/FullPageForm.tsx @@ -112,9 +112,11 @@ export function FullPageForm({ } const ConfirmNavigation = ({ blocker }: { blocker: Blocker }) => ( - blocker.reset?.()}> - Confirm Navigation - +blocker.reset?.()} + title="Confirm navigation" + > Are you sure you want to leave this page?
You will lose all progress on this form. diff --git a/app/pages/project/images/ImagesPage.tsx b/app/pages/project/images/ImagesPage.tsx index a1ebe0cc62..f6094b8be3 100644 --- a/app/pages/project/images/ImagesPage.tsx +++ b/app/pages/project/images/ImagesPage.tsx @@ -109,8 +109,7 @@ const PromoteImageModal = ({ onDismiss, imageName }: PromoteModalProps) => { } return ( -- Promote image +diff --git a/libs/ui/lib/modal/Modal.stories.tsx b/libs/ui/lib/modal/Modal.stories.tsx index 3d5aec246a..0f21cb6b4c 100644 --- a/libs/ui/lib/modal/Modal.stories.tsx +++ b/libs/ui/lib/modal/Modal.stories.tsx @@ -19,9 +19,7 @@ export function Default() { return ( <> -
- Title - +@@ -72,9 +70,7 @@ export function Sticky() { return ( <> -
- Title - + diff --git a/libs/ui/lib/modal/Modal.tsx b/libs/ui/lib/modal/Modal.tsx index 1db4f81024..6e51faa970 100644 --- a/libs/ui/lib/modal/Modal.tsx +++ b/libs/ui/lib/modal/Modal.tsx @@ -64,7 +64,7 @@ export function Modal({ children, onDismiss, title, isOpen }: ModalProps) { > {title && (- )} {children} @@ -77,7 +77,9 @@ export function Modal({ children, onDismiss, title, isOpen }: ModalProps) { ) } -Modal.Title = ({ children, id }: { children?: React.ReactNode; id?: string }) => ( +// not exported because we want to use the `title` prop on Modal so the aria +// label gets hooked up properly +const ModalTitle = ({ children, id }: { children?: React.ReactNode; id?: string }) => ({title} +{title} {children}