diff --git a/resources/ts/degree-program-overview/degree-program-overview.ts b/resources/ts/degree-program-overview/degree-program-overview.ts index ea55629..3b52449 100644 --- a/resources/ts/degree-program-overview/degree-program-overview.ts +++ b/resources/ts/degree-program-overview/degree-program-overview.ts @@ -74,6 +74,7 @@ export const updateDegreeProgramOverviewDataset = ( }; export default ( data: DegreeProgramApiData[] ) => { + degreeProgramsOverview?.setAttribute( 'aria-busy', 'true' ); degreeProgramsOverview ?.querySelectorAll( SINGLE_PROGRAM_PREVIEW_SELECTOR ) ?.forEach( ( element ) => element.remove() ); @@ -84,9 +85,11 @@ export default ( data: DegreeProgramApiData[] ) => { if ( ! programs.length ) { showNoResults(); + degreeProgramsOverview?.setAttribute( 'aria-busy', 'false' ); return; } hideNoResults(); renderPrograms( programs ); + degreeProgramsOverview?.setAttribute( 'aria-busy', 'false' ); }; diff --git a/templates/search/collection.php b/templates/search/collection.php index 7de9074..a718735 100644 --- a/templates/search/collection.php +++ b/templates/search/collection.php @@ -33,6 +33,9 @@