Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions components/ILIAS/UI/resources/js/MainControls/dist/mainbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,10 @@ var persistence = function() {

element.attr('aria-hidden', false);
//https://www.w3.org/TR/wai-aria-practices-1.1/examples/accordion/accordion.html
element.attr('role', 'region');
var currentRole = element.attr('role');
if (!currentRole || currentRole === 'region') {
element.attr('role', 'region');
}
if(isInView && !thrown) {
element.trigger('in_view'); //this is most important for async loading of slates,
//it triggers the GlobalScreen-Service.
Expand All @@ -815,8 +818,11 @@ var persistence = function() {
additional_disengage: function(){
var entry_id = dom_ref_to_element[this.html_id];
thrown_for[entry_id] = false;
this.getElement().attr('aria-hidden', true);
this.getElement().removeAttr('role', 'region');
var element = this.getElement();
element.attr('aria-hidden', true);
if (element.attr('role') === 'region') {
element.removeAttr('role');
}
}
}),
remover: Object.assign({}, dom_element, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@

element.attr('aria-hidden', false);
//https://www.w3.org/TR/wai-aria-practices-1.1/examples/accordion/accordion.html
element.attr('role', 'region');
var currentRole = element.attr('role');
if (!currentRole || currentRole === 'region') {
element.attr('role', 'region');
}
if(isInView && !thrown) {
element.trigger('in_view'); //this is most important for async loading of slates,
//it triggers the GlobalScreen-Service.
Expand All @@ -108,8 +111,11 @@
additional_disengage: function(){
var entry_id = dom_ref_to_element[this.html_id];
thrown_for[entry_id] = false;
this.getElement().attr('aria-hidden', true);
this.getElement().removeAttr('role', 'region');
var element = this.getElement();
element.attr('aria-hidden', true);
if (element.attr('role') === 'region') {
element.removeAttr('role');
}
}
}),
remover: Object.assign({}, dom_element, {
Expand Down