Skip to content

FORMS-18625: Desktop, RWD Tablet, RWD Mobile - Button is missing both a role and a name @sunnym @vavarshn #1560

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 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
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 @@ -4,6 +4,12 @@
"FileNameInvalid" : "Do not attach files where filename starts with (.), contains \\ / : * ? \" < > | ; % $, or is a reserved keyword like nul, prn, con, lpt, or com.",
"FileMimeTypeInvalid" : "File(s) ${0} are unsupported file types",
"InternalFormSubmissionError" : "Encountered an internal error while submitting the form.",
"previousMonth" : "Previous month",
"nextMonth" : "Next month",
"previousYear" : "Previous year",
"nextYear" : "Next year",
"previousSetOfYears" : "Previous set of years",
"nextSetOfYears" : "Next set of years",
"type" : "Please enter a valid value.",
"required" : "Please fill in this field.",
"minimum" : "Value must be greater than or equal to ${0}.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,15 @@ if (typeof window.DatePickerWidget === 'undefined') {
}
});
this.prevNavWidthBtn = this.#dp.getElementsByClassName("dp-leftnav")[0];
this.prevNavWidthBtn.setAttribute("role", "button");
this.prevNavWidthBtn.addEventListener("click",
function (evnt) {
if (self.view && self.#curInstance) {
self.#adjustDate(-1, self.view, false)
}
});
this.nextNavWidthBtn = this.#dp.getElementsByClassName("dp-rightnav")[0];
this.nextNavWidthBtn.setAttribute("role", "button");
this.nextNavWidthBtn.addEventListener("click",
function (evnt) {
if (self.view && self.#curInstance) {
Expand Down Expand Up @@ -641,6 +643,34 @@ if (typeof window.DatePickerWidget === 'undefined') {
this.caption.classList.toggle("disabled",
!this.#viewAction[this.view].caption);
this['$' + this.view.toLowerCase()].style.display = "block";
if (this.view === "Month") {
this.prevNavWidthBtn.setAttribute(
"aria-label",
FormView.LanguageUtils.getTranslatedString(this.#lang, "previousMonth")
);
this.nextNavWidthBtn.setAttribute(
"aria-label",
FormView.LanguageUtils.getTranslatedString(this.#lang, "nextMonth")
);
} else if (this.view === "Year") {
this.prevNavWidthBtn.setAttribute(
"aria-label",
FormView.LanguageUtils.getTranslatedString(this.#lang, "previousYear")
);
this.nextNavWidthBtn.setAttribute(
"aria-label",
FormView.LanguageUtils.getTranslatedString(this.#lang, "nextYear")
);
} else if (this.view === "Yearset") {
this.prevNavWidthBtn.setAttribute(
"aria-label",
FormView.LanguageUtils.getTranslatedString(this.#lang, "previousSetOfYears")
);
this.nextNavWidthBtn.setAttribute(
"aria-label",
FormView.LanguageUtils.getTranslatedString(this.#lang, "nextSetOfYears")
);
}
this["show" + this.view]();
}
return this;
Expand Down