Run dojo at https://dojo.telerik.com/@GaloisGirl/UtuZIyOd
All three notifications are removed after one second
The blue notification should be removed after 2 seconds, the orange one after 1 second, the red one never.
The bug only occurs with the appendTo option.
In the showStatic method, we clearly see all displayed notifications are iterated over and being attached the _hideStatic method. In my example:
The 2018.1.117 code does not feature this loop and the bug is not present.
At present, popup notifications stay in one place on the screen and if you resize the browser while there is a visible notification, it will no longer be in the expected corner of the viewport (e.g., the bottom right) - they may be somewhere around the middle or outside of the visible viewport.
The following article shows how you can reposition them with your own by calculating the new position rules: https://docs.telerik.com/kendo-ui/controls/layout/notification/how-to/move-on-window-resize.
An alternative that may be simpler is to use your own container with fixed positioning and use inline notifications in it, instead of popup notifications. With this this, you can define such a fixed position on your div that satisfies the layout and the notifications will add content to it. An example is available in the following article: https://docs.telerik.com/kendo-ui/controls/layout/notification/how-to/move-on-notification-hide.
Ideally, this feature will be built-in behind a property that will have the notification attach a handler to window.resize and will reposition the popupts automatically, maybe with a configurable delay (that is, how often after resizing the code should run). Perhaps a property like "resizeRepositionTimeout: number" can be used for both - if unset, it will default to undefined and no repositioning will occur, if set to a number, it will be used to throttle the resize event.
I'm testing https://demos.telerik.com/kendo-ui/notification/index with the NVDA screen reader.
1. Notifications are not announced by the screen reader, violating success Criterion 4.1.3.
2. Notifications are not accessible by keyboard.
3. The "close" button is not semantically a button.
4. The "close" button is not focusable by keyboard.
5. Auto-hiding notifications violate the 2.2 guideline (enough time). I can give my user an option to see notifications for a longer time, say 100 seconds instead of 10, but unable to close them by keyboard, they can end up with an overflow of messages.
6. The color contrasts are insufficient (4.26 for the red ones, only 2.73 for the green ones).
Notifications are listed on https://docs.telerik.com/kendo-ui/accessibility/section-508-wcag as AA-level compliant, and while I understand they're one of the hardest component to make accessible due to their asynchronous nature, the current implementation is closer to a bad practices example than a correct solution.