MDL-81825 core: Replace sr_text() with visually_hidden_text()

In core renderer, replace 'sr_text' method with 'visually_hidden_text' to be
consistent with Bootstrap 5 upgrade.
This commit is contained in:
Mikel Martín
2024-12-10 14:02:34 +01:00
parent f9abc562f5
commit a973ea46d7
5 changed files with 25 additions and 4 deletions
@@ -134,7 +134,7 @@ class visibility implements named_templatable, renderable {
\renderer_base $output,
choicelist $choice,
): stdClass {
$badgetext = $output->sr_text(get_string('availability'));
$badgetext = $output->visually_hidden_text(get_string('availability'));
if (!$this->mod->visible) {
$badgetext .= get_string('hiddenfromstudents');
@@ -111,7 +111,7 @@ class visibility implements named_templatable, renderable {
* @return array
*/
protected function get_visibility_dropdown(\renderer_base $output): array {
$badgetext = $output->sr_text(get_string('availability'));
$badgetext = $output->visually_hidden_text(get_string('availability'));
$badgetext .= get_string('hiddenfromstudents');
$icon = $this->get_icon('hide');