From 5aba575d25a9fd32533234621ef2ce9fd00a6bac 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 --- 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 3a7324ea48..41b99be5f1 100644 --- a/api/js/etemplate/et2_core_baseWidget.js +++ b/api/js/etemplate/et2_core_baseWidget.js @@ -213,6 +213,8 @@ var et2_baseWidget = /** @class */ (function (_super) { //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 c4b5a6b17a..18a76df5ef 100644 --- a/api/js/etemplate/et2_core_baseWidget.ts +++ b/api/js/etemplate/et2_core_baseWidget.ts @@ -289,6 +289,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) {