From 8a666c751f19d9f6c50d54d4d697a50e10725608 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 9 Jun 2021 12:01:51 -0600 Subject: [PATCH] Etemplate: Make some statustext readable by screenreader (cherry picked from commit 5aba575d25a9fd32533234621ef2ce9fd00a6bac) --- api/js/etemplate/et2_core_baseWidget.js | 2 ++ api/js/etemplate/et2_core_baseWidget.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/api/js/etemplate/et2_core_baseWidget.js b/api/js/etemplate/et2_core_baseWidget.js index 5308683563..9d78fe43da 100644 --- a/api/js/etemplate/et2_core_baseWidget.js +++ b/api/js/etemplate/et2_core_baseWidget.js @@ -189,6 +189,8 @@ export class et2_baseWidget extends et2_DOMWidget { //Get the domnode the tooltip should be attached to var elem = jQuery(this.getTooltipElement()); if (elem) { + // Make readable by screenreader + elem.attr("aria-description", this.statustext); //If a tooltip is already attached to the element, remove it first if (this._tooltipElem) { this.egw().tooltipUnbind(this._tooltipElem); diff --git a/api/js/etemplate/et2_core_baseWidget.ts b/api/js/etemplate/et2_core_baseWidget.ts index 7ceed52915..321c560b6a 100644 --- a/api/js/etemplate/et2_core_baseWidget.ts +++ b/api/js/etemplate/et2_core_baseWidget.ts @@ -292,6 +292,9 @@ export class et2_baseWidget extends et2_DOMWidget implements et2_IAligned if (elem) { + // Make readable by screenreader + elem.attr("aria-description",this.statustext); + //If a tooltip is already attached to the element, remove it first if (this._tooltipElem) {