mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Allow screen-reader to read relationship attributes for tab, tabpanels and tables under it. Similar changes are done for subnode controls.
2) Add role="img" for font icons. Fixes #4764
This commit is contained in:
committed by
Akshay Joshi
parent
e29ea15554
commit
f1a18749f6
10
web/pgadmin/static/vendor/backgrid/backgrid.js
vendored
10
web/pgadmin/static/vendor/backgrid/backgrid.js
vendored
@@ -718,6 +718,7 @@ var InputCellEditor = Backgrid.InputCellEditor = CellEditor.extend({
|
||||
*/
|
||||
render: function () {
|
||||
var model = this.model;
|
||||
this.$el.attr('aria-label', this.column.get("label"));
|
||||
this.$el.val(this.formatter.fromRaw(model.get(this.column.get("name")), model));
|
||||
return this;
|
||||
},
|
||||
@@ -2184,6 +2185,7 @@ var HeaderCell = Backgrid.HeaderCell = Backbone.View.extend({
|
||||
this.$el.append(label);
|
||||
this.$el.addClass(column.get("name"));
|
||||
this.$el.addClass(column.get("direction"));
|
||||
this.$el.attr("role", "columnheader");
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
@@ -2840,6 +2842,9 @@ var Grid = Backgrid.Grid = Backbone.View.extend({
|
||||
/** @property */
|
||||
footer: null,
|
||||
|
||||
/** @property */
|
||||
attr: null,
|
||||
|
||||
/**
|
||||
Initializes a Grid instance.
|
||||
|
||||
@@ -2851,6 +2856,7 @@ var Grid = Backgrid.Grid = Backbone.View.extend({
|
||||
@param {Backgrid.Body} [options.body=Backgrid.Body] An optional Body class to override the default.
|
||||
@param {Backgrid.Row} [options.row=Backgrid.Row] An optional Row class to override the default.
|
||||
@param {Backgrid.Footer} [options.footer=Backgrid.Footer] An optional Footer class.
|
||||
|
||||
*/
|
||||
initialize: function (options) {
|
||||
// Convert the list of column objects here first so the subviews don't have
|
||||
@@ -2879,6 +2885,8 @@ var Grid = Backgrid.Grid = Backbone.View.extend({
|
||||
this.footer = new this.footer(filteredOptions);
|
||||
}
|
||||
|
||||
this.attr = options.attr || {};
|
||||
|
||||
this.listenTo(this.columns, "reset", function () {
|
||||
if (this.header) {
|
||||
this.header = new (this.header.remove().constructor)(filteredOptions);
|
||||
@@ -2960,6 +2968,8 @@ var Grid = Backgrid.Grid = Backbone.View.extend({
|
||||
}
|
||||
|
||||
this.$el.append(this.body.render().$el);
|
||||
this.$el.attr("role", "table");
|
||||
this.$el.attr(this.attr);
|
||||
|
||||
this.delegateEvents();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user