diff --git a/change/@fluentui-react-dialog-f9dfeb62-a482-488e-920e-6964233f20f5.json b/change/@fluentui-react-dialog-f9dfeb62-a482-488e-920e-6964233f20f5.json new file mode 100644 index 0000000000000..2e3803712c9ad --- /dev/null +++ b/change/@fluentui-react-dialog-f9dfeb62-a482-488e-920e-6964233f20f5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: add default heading role and level to DialogTitle", + "packageName": "@fluentui/react-dialog", + "email": "sarah.higley@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-dialog/src/components/DialogTitle/__snapshots__/DialogTitle.test.tsx.snap b/packages/react-components/react-dialog/src/components/DialogTitle/__snapshots__/DialogTitle.test.tsx.snap index c32d25e64a3c6..8c158848eed4a 100644 --- a/packages/react-components/react-dialog/src/components/DialogTitle/__snapshots__/DialogTitle.test.tsx.snap +++ b/packages/react-components/react-dialog/src/components/DialogTitle/__snapshots__/DialogTitle.test.tsx.snap @@ -3,7 +3,9 @@ exports[`DialogTitle renders a default state 1`] = `
Default DialogTitle
diff --git a/packages/react-components/react-dialog/src/components/DialogTitle/useDialogTitle.tsx b/packages/react-components/react-dialog/src/components/DialogTitle/useDialogTitle.tsx index df669cb699cc3..324a37f325dd1 100644 --- a/packages/react-components/react-dialog/src/components/DialogTitle/useDialogTitle.tsx +++ b/packages/react-components/react-dialog/src/components/DialogTitle/useDialogTitle.tsx @@ -29,6 +29,8 @@ export const useDialogTitle_unstable = (props: DialogTitleProps, ref: React.Ref< root: getNativeElementProps(as ?? 'div', { ref, id: useDialogContext_unstable(ctx => ctx.dialogTitleId), + role: 'heading', + 'aria-level': '2', ...props, }), action: resolveShorthand(action, {