From 0b866b1c7d79149317982622ed031f9a4591267b Mon Sep 17 00:00:00 2001 From: Sarah Higley Date: Wed, 5 Apr 2023 13:56:51 -0700 Subject: [PATCH 1/3] fix: add default heading role and level to Dialogtitle --- .../react-dialog/src/components/DialogTitle/useDialogTitle.tsx | 2 ++ 1 file changed, 2 insertions(+) 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, { From 8d731ff180ce886f3b06c089d8eaa88fb9aea5dd Mon Sep 17 00:00:00 2001 From: Sarah Higley Date: Wed, 5 Apr 2023 13:59:15 -0700 Subject: [PATCH 2/3] update snapshot --- .../DialogTitle/__snapshots__/DialogTitle.test.tsx.snap | 2 ++ 1 file changed, 2 insertions(+) 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
From 28ab6352168e89c639bd47d22225bf6e62fb0b83 Mon Sep 17 00:00:00 2001 From: Sarah Higley Date: Wed, 5 Apr 2023 14:02:03 -0700 Subject: [PATCH 3/3] changefile --- ...-react-dialog-f9dfeb62-a482-488e-920e-6964233f20f5.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-dialog-f9dfeb62-a482-488e-920e-6964233f20f5.json 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" +}