MOBILE-3320 a11y: Fix course section buttons
parent
e9c84c71d0
commit
dd111fce31
|
@ -414,6 +414,8 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
CoreCourse.logView(this.course!.id, newSection.section, undefined, this.course!.fullname),
|
CoreCourse.logView(this.course!.id, newSection.section, undefined, this.course!.fullname),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.invalidateSectionButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -506,6 +508,25 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
done?.();
|
done?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invalidate section buttons so that they are rendered again. This is necessary in order to update
|
||||||
|
* some attributes that are not reactive, for example aria-label.
|
||||||
|
*
|
||||||
|
* @see https://github.com/ionic-team/ionic-framework/issues/21534
|
||||||
|
*/
|
||||||
|
protected async invalidateSectionButtons(): Promise<void> {
|
||||||
|
const previousSection = this.previousSection;
|
||||||
|
const nextSection = this.nextSection;
|
||||||
|
|
||||||
|
this.previousSection = undefined;
|
||||||
|
this.nextSection = undefined;
|
||||||
|
|
||||||
|
await CoreUtils.nextTick();
|
||||||
|
|
||||||
|
this.previousSection = previousSection;
|
||||||
|
this.nextSection = nextSection;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show more activities (only used when showing all the sections at the same time).
|
* Show more activities (only used when showing all the sections at the same time).
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue