mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-80831 gradereport_grader: Remove unnecessary setting of aria-hidden
- If an element is being hidden visually with `display: none;` (e.g. by using the class `.d-none`), there's no need to set `aria-hidden` because it is already hidden from the accessibility tree. - Setting `aria-hidden=false` is also not recommended and it's better to remove the `aria-hidden` attribute instead of setting it to false.
This commit is contained in:
parent
89c6376fcc
commit
1085bf7897
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -425,8 +425,6 @@ export default class ColumnSearch extends search_combobox {
|
||||
const rowCell = avgRowCell ?? rangeRowCell;
|
||||
|
||||
rowCell?.classList.toggle('d-none');
|
||||
rowCell?.setAttribute('aria-hidden',
|
||||
rowCell?.classList.contains('d-none') ? 'true' : 'false');
|
||||
} else if (content.classList.contains('d-none')) {
|
||||
// We should always have content but some cells do not contain menus or other actions.
|
||||
element.classList.remove('collapsed');
|
||||
@ -436,19 +434,15 @@ export default class ColumnSearch extends search_combobox {
|
||||
}
|
||||
nodeSet.forEach(node => {
|
||||
node?.classList.remove('d-none');
|
||||
node?.setAttribute('aria-hidden', 'false');
|
||||
});
|
||||
expandButton?.classList.add('d-none');
|
||||
expandButton?.setAttribute('aria-hidden', 'true');
|
||||
} else {
|
||||
element.classList.add('collapsed');
|
||||
content.classList.remove('d-flex');
|
||||
nodeSet.forEach(node => {
|
||||
node?.classList.add('d-none');
|
||||
node?.setAttribute('aria-hidden', 'true');
|
||||
});
|
||||
expandButton?.classList.remove('d-none');
|
||||
expandButton?.setAttribute('aria-hidden', 'false');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user