Skip to content

Commit

Permalink
Update init.js
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelspellacy committed Oct 12, 2024
1 parent b34c284 commit 18e26b4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions a11y/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,13 +692,14 @@ function fixMindReaderInput() {

// Set Autocomplete Description

var autoCompleteMessage = document.createElement("span");
autoCompleteMessage.setAttribute("id", "autocomplete-message-" + inputId);
autoCompleteMessage.setAttribute("hidden", "");
autoCompleteMessage.textContent = "When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.";

if (input) {
var autoCompleteID = document.getElementById("autocomplete-message-" + inputId);

if (!autoCompleteID) {

var autoCompleteMessage = document.createElement("span");
autoCompleteMessage.setAttribute("id", "autocomplete-message-" + inputId);
autoCompleteMessage.setAttribute("hidden", "");
autoCompleteMessage.textContent = "When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.";
input.parentNode.appendChild(autoCompleteMessage);

}
Expand Down

0 comments on commit 18e26b4

Please sign in to comment.