@@ -4,7 +4,11 @@ import Audio from '@uppy/audio'
44import Webcam from '@uppy/webcam'
55
66import type { ContactFormElements } from './@types'
7- import { queryAccessibilityLabelTargets , queryUppyDashboardTarget } from './selectors'
7+ import {
8+ queryAccessibilityLabelTargets ,
9+ queryUppyDashboardRoots ,
10+ queryUppyDashboardTarget ,
11+ } from './selectors'
812import { isUnitTest } from '@components/scripts/utils/environmentClient'
913
1014export interface UploadController {
@@ -73,7 +77,7 @@ export const ensureUppyGeneratedAccessibility = (root: ParentNode & Node): Mutat
7377 element . setAttribute ( 'aria-label' , fallback )
7478 }
7579
76- root . querySelectorAll ( UPPY_DASHBOARD_SELECTOR ) . forEach ( applyUppyDashboardSemantics )
80+ queryUppyDashboardRoots ( root ) . forEach ( applyUppyDashboardSemantics )
7781 queryAccessibilityLabelTargets ( root ) . forEach ( labelIfMissing )
7882
7983 const observer = new MutationObserver ( mutations => {
@@ -89,7 +93,7 @@ export const ensureUppyGeneratedAccessibility = (root: ParentNode & Node): Mutat
8993 }
9094
9195 if ( 'querySelectorAll' in node ) {
92- node . querySelectorAll ( UPPY_DASHBOARD_SELECTOR ) . forEach ( applyUppyDashboardSemantics )
96+ queryUppyDashboardRoots ( node as ParentNode ) . forEach ( applyUppyDashboardSemantics )
9397 queryAccessibilityLabelTargets ( node as ParentNode ) . forEach ( labelIfMissing )
9498 }
9599 } )
0 commit comments