mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-08 20:18:28 -05:00
Fixed accessibility issue for the missing label from the table header.
This commit is contained in:
committed by
Akshay Joshi
parent
37f55ccc25
commit
4036f2a0f2
@@ -611,6 +611,17 @@ define([
|
||||
this.$el.attr('aria-label', getAriaLabel);
|
||||
}
|
||||
},
|
||||
render: function() {
|
||||
Backgrid.HeaderCell.prototype.render.apply(this, arguments);
|
||||
// If table header label is not present then screen reader will raise
|
||||
// an error we will add span for screen reader only
|
||||
if (this.column.get('label') == '' || !this.column.get('label')) {
|
||||
let getAriaLabel = this.column.get('cellAriaLabel');
|
||||
if (getAriaLabel)
|
||||
this.$el.append(`<span class="sr-only">${getAriaLabel}</span>`);
|
||||
}
|
||||
return this;
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user