When creating an application in Next.js 15.5.4 I'm encountering the following error message when using the IDKitWidget from the react package.
Steps to reproduce:
- Create a new Next.js app
- Create a client component that contains the basic implementation for the react widget per the developer docs
- Use the component on a page
- Click the button to open the verification dialog
- Encounter DialogTitle error
Basic component code for testing:
"use client";
import {
IDKitWidget,
VerificationLevel,
ISuccessResult,
} from "@worldcoin/idkit";
import { Button } from "@/components/ui/button";
import { Shield } from "lucide-react";
export default function Verify() {
const handleVerify = async (proof: ISuccessResult) => {
const res = await fetch("/api/verify", {
method: "POST",
body: JSON.stringify(proof),
});
if (!res.ok) {
throw new Error("Failed to verify ID");
}
};
const onSuccess = (result: ISuccessResult) => {
console.log("Successfully verified");
};
return (
<IDKitWidget
action={process.env.NEXT_PUBLIC_WORLD_ACTION_ID as string}
app_id={process.env.NEXT_PUBLIC_WORLD_APP_ID as `app_${string}`}
onSuccess={onSuccess}
handleVerify={handleVerify}
verification_level={VerificationLevel.Orb}
>
{({ open }) => (
<Button onClick={open} variant="outline" className="gap-2">
<Shield className="h-4 w-4" />
Verify with World ID
</Button>
)}
</IDKitWidget>
);
}
Error Type
Console Error
Error Message
DialogContent requires a DialogTitle for the component to be accessible for screen reader users.
If you want to hide the DialogTitle, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/dialog
at Verify (components/verify.tsx:30:5)
at Home (app/page.tsx:276:13)
Code Frame
28 | // in their widget internally.
29 |
30 | <IDKitWidget
| ^
31 | action={process.env.NEXT_PUBLIC_WORLD_ACTION_ID as string}
32 | app_id={process.env.NEXT_PUBLIC_WORLD_APP_ID as app_${string}}
33 | onSuccess={onSuccess}
Next.js version: 15.5.4 (Turbopack)
`
When creating an application in Next.js 15.5.4 I'm encountering the following error message when using the IDKitWidget from the react package.
Steps to reproduce:
Basic component code for testing:
Error Type
Console Error
Error Message
DialogContentrequires aDialogTitlefor the component to be accessible for screen reader users.If you want to hide the
DialogTitle, you can wrap it with our VisuallyHidden component.For more information, see https://radix-ui.com/primitives/docs/components/dialog
Code Frame
28 | // in their widget internally.
29 |
Next.js version: 15.5.4 (Turbopack)
`