mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-07 10:16:38 +08:00
fix: add visually hidden DialogTitle to resolve a11y warning and fix modal background
This commit is contained in:
@@ -5383,7 +5383,7 @@ export default function ForwardPage() {
|
|||||||
<Modal
|
<Modal
|
||||||
backdrop="blur"
|
backdrop="blur"
|
||||||
classNames={{
|
classNames={{
|
||||||
base: "!w-[calc(100%-32px)] !mx-auto sm:!w-full rounded-2xl overflow-hidden",
|
base: "!w-[calc(100%-32px)] !mx-auto sm:!w-full rounded-2xl overflow-hidden [&>div]:bg-content1 [&>div]:dark:bg-content1",
|
||||||
}}
|
}}
|
||||||
isOpen={diagnosisModalOpen}
|
isOpen={diagnosisModalOpen}
|
||||||
placement="center"
|
placement="center"
|
||||||
|
|||||||
@@ -3201,7 +3201,7 @@ export default function TunnelPage() {
|
|||||||
<Modal
|
<Modal
|
||||||
backdrop="blur"
|
backdrop="blur"
|
||||||
classNames={{
|
classNames={{
|
||||||
base: "!w-[calc(100%-32px)] !mx-auto sm:!w-full rounded-2xl overflow-hidden",
|
base: "!w-[calc(100%-32px)] !mx-auto sm:!w-full rounded-2xl overflow-hidden [&>div]:bg-content1 [&>div]:dark:bg-content1",
|
||||||
}}
|
}}
|
||||||
isOpen={diagnosisModalOpen}
|
isOpen={diagnosisModalOpen}
|
||||||
placement="center"
|
placement="center"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import * as React from "react";
|
|||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent as BaseDialogContent,
|
DialogContent as BaseDialogContent,
|
||||||
|
DialogTitle,
|
||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -159,6 +160,7 @@ export function ModalContent({
|
|||||||
showCloseButton={false}
|
showCloseButton={false}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
<DialogTitle className="sr-only">Modal Dialog</DialogTitle>
|
||||||
{renderedChildren}
|
{renderedChildren}
|
||||||
</BaseDialogContent>
|
</BaseDialogContent>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user