mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix accessibility issues:
1) Suppress ESC key presses in Alertify dialogues when the come from Select2 controls (It also closes the alertify dialog when user try to close Select2 using ESC key) 2) Do not allow Tabindex focus on Switch control when it is disbaled 3) Tab keyboard shortcut navigation does not work in wcDocker iframe. Fixes #4935
This commit is contained in:
committed by
Akshay Joshi
parent
f22134dabd
commit
6a5d98cf19
@@ -20,3 +20,4 @@ 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 #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.
|
||||
|
||||
@@ -14,6 +14,7 @@ import Mousetrap from 'mousetrap';
|
||||
import * as commonUtils from '../../../static/js/utils';
|
||||
import dialogTabNavigator from '../../../static/js/dialog_tab_navigator';
|
||||
import * as keyboardFunc from 'sources/keyboard_shortcuts';
|
||||
import pgWindow from 'sources/window';
|
||||
|
||||
const pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
|
||||
@@ -366,8 +367,8 @@ _.extend(pgBrowser.keyboardNavigation, {
|
||||
};
|
||||
},
|
||||
getDialogTabNavigator: function(dialogContainer) {
|
||||
const backward_shortcut = pgBrowser.get_preference('browser', 'dialog_tab_backward').value;
|
||||
const forward_shortcut = pgBrowser.get_preference('browser', 'dialog_tab_forward').value;
|
||||
const backward_shortcut = pgWindow.pgAdmin.Browser.get_preference('browser', 'dialog_tab_backward').value;
|
||||
const forward_shortcut = pgWindow.pgAdmin.Browser.get_preference('browser', 'dialog_tab_forward').value;
|
||||
|
||||
return new dialogTabNavigator.dialogTabNavigator(dialogContainer, backward_shortcut, forward_shortcut);
|
||||
},
|
||||
|
||||
@@ -469,7 +469,7 @@ define([
|
||||
* instead of alertify dialog
|
||||
*/
|
||||
$('body').off('keyup').on('keyup', function(ev){
|
||||
if(ev.which === 13) {
|
||||
if(ev.which === 13 || ev.which === 27) {
|
||||
let suppressForClasses = ['select2-selection', 'select2-search__field'];
|
||||
let $el = $(ev.target);
|
||||
for(let i=0; i<suppressForClasses.length; i++){
|
||||
|
||||
@@ -606,7 +606,8 @@ define([
|
||||
|
||||
this.$input = this.$el.find('input[type=checkbox]').first();
|
||||
this.$input.bootstrapToggle();
|
||||
this.$el.find('.toggle.btn').attr('tabindex', '0');
|
||||
// When disable then set tabindex value to -1
|
||||
this.$el.find('.toggle.btn').attr('tabindex', data.options.disabled ? '-1' : '0');
|
||||
this.updateInvalid();
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user