Skip to content

Commit

Permalink
fix(modal): aria-label a11y bug (#13242)
Browse files Browse the repository at this point in the history
Co-authored-by: Francine Lucca <40550942+francinelucca@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 8, 2023
1 parent 885108d commit c74db90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react/src/components/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const getInstanceId = setupGetInstanceId();

const Modal = React.forwardRef(function Modal(
{
'aria-label': ariaLabelProp,
children,
className,
modalHeading,
Expand Down Expand Up @@ -158,7 +159,7 @@ const Modal = React.forwardRef(function Modal(
);

const ariaLabel =
modalLabel || rest['aria-label'] || modalAriaLabel || modalHeading;
modalLabel || ariaLabelProp || modalAriaLabel || modalHeading;
const getAriaLabelledBy = modalLabel ? modalLabelId : modalHeadingId;

const hasScrollingContentProps = hasScrollingContent
Expand Down

0 comments on commit c74db90

Please sign in to comment.