Fixing footer, header and calendar WCAG Issues

This commit is contained in:
DESKTOP-FD57EEK\Joshua Matamorros 2025-07-13 20:58:04 -06:00
parent 012d9ed210
commit 16c2016fe9

View file

@ -0,0 +1,30 @@
import {
AfterViewInit,
Directive,
ElementRef,
Renderer2,
} from '@angular/core';
@Directive({
selector: '[ngxCalendarAriaLabel]', // apply only to nb-calendar with this attribute
})
export class CalendarAriaLabelDirective implements AfterViewInit {
constructor(private el: ElementRef, private renderer: Renderer2) {}
ngAfterViewInit() {
setTimeout(() => {
const nativeElement = this.el.nativeElement;
const prevBtn = nativeElement.querySelector('.prev-month');
const nextBtn = nativeElement.querySelector('.next-month');
if (prevBtn) {
this.renderer.setAttribute(prevBtn, 'aria-label', 'Go to previous month');
}
if (nextBtn) {
this.renderer.setAttribute(nextBtn, 'aria-label', 'Go to next month');
}
}, 0);
}
}