MDL-87803 blocks: set ARIA label to string content value.

Previously it was a string instance, which meant it wasn't encoded
correctly when used as part of the delete block confirmation.
This commit is contained in:
Paul Holden
2026-03-06 14:46:01 +00:00
parent 6ebf41a6c2
commit d562582b48
+2 -3
View File
@@ -240,9 +240,8 @@ class block_base {
$bc->title = $this->title;
}
if (empty($bc->title)) {
$bc->arialabel = new lang_string('pluginname', get_class($this));
$this->arialabel = $bc->arialabel;
if ((string) $bc->title === '') {
$this->arialabel = $bc->arialabel = get_string('pluginname', get_class($this));
}
if ($this->page->user_is_editing() && $this->instance_can_be_edited()) {