Skip to content

FORMS-18626: Desktop, RWD Tablet, RWD Mobile - Button does not have a… #1628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ if (typeof window.DatePickerWidget === 'undefined') {
}
});
this.caption = this.#dp.getElementsByClassName("dp-caption")[0];
this.caption.setAttribute("role", "button");
this.caption.addEventListener("click",
function (evnt) {
if (self.view && self.#curInstance) {
Expand Down Expand Up @@ -640,6 +641,16 @@ if (typeof window.DatePickerWidget === 'undefined') {
this.view = nextView;
this.caption.classList.toggle("disabled",
!this.#viewAction[this.view].caption);
let ariaLabel = "";
if (this.view === "Month") {
ariaLabel = this.#options.locale.months[this.currentMonth] + " " + this.currentYear;
} else if (this.view === "Year") {
ariaLabel = this.currentYear;
} else if (this.view === "Yearset") {
const startYear = this.currentYear - this.#options.yearsPerView / 2;
const endYear = startYear + this.#options.yearsPerView - 1;
ariaLabel = startYear + "-" + endYear;
}
this['$' + this.view.toLowerCase()].style.display = "block";
this["show" + this.view]();
}
Expand Down
Loading