Fix main window tab navigation accessibility issue:

1) Dashboard -> Server Activity grid: terminate the session, cancel active button not navigable using tab key.
2) SQL -> If the focus inside code mirror control tab navigation not working.

Fixes #4930
This commit is contained in:
Nagesh Dhope 2019-11-15 11:31:19 +05:30 committed by Akshay Joshi
parent 6a5d98cf19
commit 397a1b9616
5 changed files with 25 additions and 1 deletions

View File

@ -19,5 +19,6 @@ Bug fixes
| `Issue #4792 <https://redmine.postgresql.org/issues/4792>`_ - Ensure that the superuser should be able to create database, as the superuser overrides all the access restrictions.
| `Issue #4878 <https://redmine.postgresql.org/issues/4878>`_ - Ensure that the superuser should be able to create role, as the superuser overrides all the access restrictions.
| `Issue #4930 <https://redmine.postgresql.org/issues/4930>`_ - Fix main window tab navigation accessibility issue.
| `Issue #4934 <https://redmine.postgresql.org/issues/4934>`_ - Fix the help button link on the User Management dialog.
| `Issue #4935 <https://redmine.postgresql.org/issues/4935>`_ - Fix accessibility issues.

View File

@ -134,7 +134,7 @@ _.extend(pgBrowser.keyboardNavigation, {
bindRightPanel: function(event, combo) {
let allPanels = pgAdmin.Browser.docker.findPanels();
let activePanel = 0;
let nextPanel = allPanels.length;
let nextPanel = allPanels.length - 1;
let prevPanel = 1;
let activePanelId = 0;
let activePanelFlag = false;

View File

@ -52,6 +52,13 @@ define('pgadmin.dashboard', [
'\'></i>'
);
}
this.$el.attr('tabindex', 0);
this.$el.on('keydown', function(e) {
// terminating session or cancel the active query.
if (e.keyCode == 32) {
self.$el.click();
}
}),
this.delegateEvents();
return this;
},

View File

@ -26,4 +26,16 @@ import 'codemirror/addon/comment/comment';
import 'sources/codemirror/addon/fold/pgadmin-sqlfoldcode';
import 'sources/codemirror/extension/centre_on_line';
var cmds = CodeMirror.commands;
cmds.focusOut = function(){
event.stopPropagation();
document.activeElement.blur();
if(event.currentTarget.parents().find('.sql-code-control')) {
// for code mirror in dialogs
event.currentTarget.parents().find('.sql-code-control').focus();
}
};
CodeMirror.keyMap.default['Esc'] = 'focusOut';
export default CodeMirror;

View File

@ -626,6 +626,10 @@ fieldset.inline-fieldset > div {
height: 100%;
}
& .btn-secondary:focus {
box-shadow: $input-btn-focus-box-shadow;
}
& .input-group {
& .input-group-text {
background: $input-bg;