MDL-81825 theme_boost: Refactor .sr-only usages for BS5

- Add .visually-hidden to the Boostratp 5 bridge SCSS file
- Replace .sr-only occurrences with .visually-hidden
- Replace .dropzone-sr-only-focusable  with .dropzone-visually-hidden-focusable
  for consistency
This commit is contained in:
Mikel Martín 2024-11-08 10:35:21 +01:00
parent 0888a6d324
commit f9abc562f5
220 changed files with 469 additions and 439 deletions

View file

@ -138,7 +138,7 @@ class report_schedules extends system_report {
'checked' => $row->enabled,
'dataattributes' => $attributes,
'label' => $label,
'labelclasses' => 'sr-only'
'labelclasses' => 'visually-hidden',
]);
})
);

View file

@ -299,7 +299,7 @@ abstract class base_report_table extends table_sql implements dynamic, renderabl
$this->wrap_html_start();
$this->set_caption($this->report::get_name(), ['class' => 'sr-only']);
$this->set_caption($this->report::get_name(), ['class' => 'visually-hidden']);
echo html_writer::start_tag('div');
echo html_writer::start_tag('table', $this->attributes) . $this->render_caption();

View file

@ -153,7 +153,7 @@ class system_report_table extends base_report_table {
// If the report has any actions then append appropriate column, note that actions are excluded during download.
if ($this->report->has_actions() && !$this->is_downloading()) {
$columnheaders['actions'] = html_writer::tag('span', get_string('actions', 'core_reportbuilder'), [
'class' => 'sr-only',
'class' => 'visually-hidden',
]);
$this->no_sorting('actions');
}

View file

@ -24,7 +24,7 @@
"report": "The report content"
}
}}
<h2 class="sr-only">{{#str}} access, core_reportbuilder {{/str}}</h2>
<h2 class="visually-hidden">{{#str}} access, core_reportbuilder {{/str}}</h2>
<div class="reportbuilder-access-container">
{{{ report }}}
</div>

View file

@ -45,7 +45,7 @@
}]
}
}}
<h2 class="sr-only">{{#str}} audience, core_reportbuilder {{/str}}</h2>
<h2 class="visually-hidden">{{#str}} audience, core_reportbuilder {{/str}}</h2>
<div class="audiences-wrapper d-flex flex-column flex-lg-row">
<div id="audiences-menu">
{{! Sidebar }}

View file

@ -93,7 +93,7 @@
}
}
}}
<h2 class="sr-only">{{#str}} editor, core_reportbuilder {{/str}}</h2>
<h2 class="visually-hidden">{{#str}} editor, core_reportbuilder {{/str}}</h2>
<div class="reportbuilder-report"
data-region="core_reportbuilder/report"
data-report-id="{{id}}"

View file

@ -42,7 +42,7 @@
{{#conditions}}
{{#hasavailableconditions}}
<div class="reportbuilder-conditions-select">
<label for="addconditionselect" class="sr-only">{{#str}} selectacondition, core_reportbuilder {{/str}}</label>
<label for="addconditionselect" class="visually-hidden">{{#str}} selectacondition, core_reportbuilder {{/str}}</label>
<select id="addconditionselect" data-action="report-add-condition" class="w-100 custom-select">
<option value="0"></option>
{{#availableconditions}}

View file

@ -46,7 +46,7 @@
{{#filters}}
{{#hasavailablefilters}}
<div class="reportbuilder-filters-select">
<label for="addfilterselect" class="sr-only">{{#str}}selectafilter, core_reportbuilder{{/str}}</label>
<label for="addfilterselect" class="visually-hidden">{{#str}}selectafilter, core_reportbuilder{{/str}}</label>
<select id="addfilterselect" name="addfilterselect" data-action="report-add-filter" class="w-100 custom-select">
<option value="0"></option>
{{#availablefilters}}

View file

@ -69,7 +69,7 @@
<input id="toggle-sort-{{id}}" title="{{{sortenabledtitle}}}" data-action="report-toggle-column-sorting" type="checkbox" {{#sortenabled}}checked{{/sortenabled}}>
<label for="toggle-sort-{{id}}" class="mb-0">
<span class="ms-2 text-dark {{^sortenabled}}text-muted{{/sortenabled}}">{{{heading}}}</span>
<span class="sr-only">{{{sortenabledtitle}}}</span>
<span class="visually-hidden">{{{sortenabledtitle}}}</span>
</label>
</li>
{{/sortablecolumns}}

View file

@ -35,7 +35,7 @@
<div id="region-sidebar-menu-{{uniqid}}" class="reportbuilder-sidebar-menu d-flex flex-column me-lg-3 mb-3 mb-lg-0" data-region="sidebar-menu">
<div class="input-group mb-3">
<label for="reportbuilder-sidebar-search">
<span class="sr-only">{{#str}} search, core_search {{/str}}</span>
<span class="visually-hidden">{{#str}} search, core_search {{/str}}</span>
</label>
<input id="reportbuilder-sidebar-search"
type="text"