MCPcopy
hub / github.com/ajaxorg/ace / setAriaOptions

Method setAriaOptions

src/keyboard/textinput.js:758–776  ·  view source on GitHub ↗

* @param {import("../../ace-internal").Ace.TextInputAriaOptions} options

(options)

Source from the content-addressed store, hash-verified

756 * @param {import("../../ace-internal").Ace.TextInputAriaOptions} options
757 */
758 setAriaOptions(options) {
759 if (options.activeDescendant) {
760 this.text.setAttribute("aria-haspopup", "true");
761 this.text.setAttribute("aria-autocomplete", options.inline ? "both" : "list");
762 this.text.setAttribute("aria-activedescendant", options.activeDescendant);
763 }
764 else {
765 this.text.setAttribute("aria-haspopup", "false");
766 this.text.setAttribute("aria-autocomplete", "both");
767 this.text.removeAttribute("aria-activedescendant");
768 }
769 if (options.role) {
770 this.text.setAttribute("role", options.role);
771 }
772 if (options.setLabel) {
773 this.text.setAttribute("aria-roledescription", nls("text-input.aria-roledescription", "editor"));
774 this.setAriaLabel();
775 }
776 }
777
778 focus() {
779 // On focusing on the textarea, read active row number to assistive tech.

Callers 6

constructorMethod · 0.95
focusMethod · 0.95
editor.jsFile · 0.80
openPopupMethod · 0.80
$openMethod · 0.80
editor.40.jsFile · 0.80

Calls 2

setAriaLabelMethod · 0.95
setAttributeMethod · 0.80

Tested by

no test coverage detected