Open djbuckley opened 7 years ago
Parking this for now as having difficulty getting a Dialog to render with emzyme to be able to test the key esc event handling. Need to review once we have more experience using the tools available and potentially rework Dialog so that it will render.
Had another look at this and decided the area needs a bit of rework as the overrideModalEscKey property is a little ambiguous and does not align with the disableEscKeyforDialogs property on DatePicker. Changes required...
[ ] rename overrideModalEscKey property to disableEscKeyForDialogs to align with datePicker and make clear what it does.
[ ] Change dialog so that it closes with esc key unless disableEscKeyForDialogs is true.(a11y guidlines suggest that all dialogues should be dismissable via the esc key)
[ ] Change DatePicker and datepickerdialog to use renamed property of dialog
[ ] Add unit test to validate esc handling
Waiting on WIP tasks on Dialog and datePicker completing
When overrideModalEscKey is populated with true, the dialog window should not close when escape is pressed