Skip to content

Commit

Permalink
Restore conditional aria-label for the scrollable section.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Feb 9, 2023
1 parent abc31c2 commit 04b9c37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/components/src/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ function UnforwardedModal(
role="document"
onScroll={ onContentContainerScroll }
ref={ contentRef }
aria-label={ __( 'Scrollable section' ) }
aria-label={
hasScrollableContent
? __( 'Scrollable section' )
: undefined
}
tabIndex={ hasScrollableContent ? 0 : undefined }
>
{ ! __experimentalHideHeader && (
Expand Down

0 comments on commit 04b9c37

Please sign in to comment.