MDL-84961 core: Avoid loading the hidden table under the chart

Remove the table from under the chart when it is disabled, instead of just hiding it.
This commit is contained in:
Odei Alba
2025-03-24 17:26:18 +01:00
parent f501225d0f
commit 3fc1fd23f0
+11 -9
View File
@@ -26,15 +26,17 @@
}
}}
<div class="chart-area" id="chart-area-{{uniqid}}">
<div class="chart-image" role="presentation" aria-describedby="chart-table-data-{{uniqid}}"></div>
<div class="chart-table {{^withtable}}accesshide{{/withtable}}">
<p class="chart-table-expand">
<a href="#" aria-controls="chart-table-data-{{uniqid}}" role="button">
{{#str}}showchartdata, moodle{{/str}}
</a>
</p>
<div class="chart-table-data" id="chart-table-data-{{uniqid}}" {{#withtable}}role="complementary" aria-expanded="false"{{/withtable}}></div>
</div>
<div class="chart-image" role="presentation" {{#withtable}}aria-describedby="chart-table-data-{{uniqid}}"{{/withtable}}></div>
{{#withtable}}
<div class="chart-table">
<p class="chart-table-expand">
<a href="#" aria-controls="chart-table-data-{{uniqid}}" role="button">
{{#str}}showchartdata, moodle{{/str}}
</a>
</p>
<div class="chart-table-data" id="chart-table-data-{{uniqid}}" role="complementary" aria-expanded="false"></div>
</div>
{{/withtable}}
</div>
{{#js}}