Skip to content

Commit

Permalink
fix: a11y modal heading issue (#17447)
Browse files Browse the repository at this point in the history
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
  • Loading branch information
riddhybansal and tay1orjones authored Oct 7, 2024
1 parent e8c7672 commit eeaebc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const ModalHeader = React.forwardRef<HTMLDivElement, ModalHeaderProps>(
<div className={headerClass} {...rest} ref={ref}>
{label && <h2 className={labelClass}>{label}</h2>}

{title && <h3 className={titleClass}>{title}</h3>}
{title && <h2 className={titleClass}>{title}</h2>}

{children}

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ const Modal = React.forwardRef(function Modal(
</Text>
)}
<Text
as="h3"
as="h2"
id={modalHeadingId}
className={`${prefix}--modal-header__heading`}>
{modalHeading}
Expand Down

0 comments on commit eeaebc9

Please sign in to comment.