Last Updated: 16 Sep 2020 12:11 by ADMIN
Release R3 2020 SP1
Created on: 16 Sep 2020 12:03
Category: Editor
Type: Bug Report
JavaScript error when rendering for mobile and EnableAriaSupport=true
Like the title says, when the editor renders as mobile and EnableAriaSupport="true", the editor fails to initialize on JavaScript-level.
1 comment
Posted on: 16 Sep 2020 12:11

Hi Linus,

Thank you for reporting the "Cannot read properties of null (reading: setAttribute)" bug!

I have good news that it will be fixed for the upcoming service pack release R3 2020 SP1.

You can fix it in the previous versions without disabling the WAI-ARIA support with the following code:


            var $T = Telerik.Web.UI;
            var $Editor = $T.Editor;
            $T.RadEditor.prototype._applyAriaSupport = function () {
                this.get_element().setAttribute("role", "presentation");
                var toolbarContainer = this.get_toolContainer();
                var i;
                if (toolbarContainer) {
                    toolbarContainer.setAttribute("role", "toolbar");
                    var toolWrappers = toolbarContainer.getElementsByTagName("ul");
                    for (i = 0; i < toolWrappers.length; i++) {
                        toolWrappers[i].setAttribute("role", "presentation");
                var modesWrapper = this._getModeButtonsWrapper();
                if (modesWrapper != null) {
                    modesWrapper.setAttribute("role", "presentation");

                    var as = modesWrapper.getElementsByTagName("*");
                    for (i = 0; i < as.length; i++) {
                        var domElement = as[i];
                        var role = domElement.tagName.toLowerCase() == "a" ? "button" : "presentation";
                        domElement.setAttribute("role", role);

                var hiddenArea = this._contentHiddenTextarea;
                if (hiddenArea) hiddenArea.setAttribute("aria-hidden", "true");
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <telerik:RadEditor ID="RadEditor1" runat="server" EnableAriaSupport="true" RenderMode="Mobile"></telerik:RadEditor>



Best Regards,
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Hi Linus,