applets/katesessions: general cleanup and keyboard interaction rework
This MR contains some general cleanup and a rework of the keyboard handling to make it work better and be accessible to screen readers. As some of the fixes depend on the cleanup, splitting them into separate MRs didn't make much sense, but they are split into three commits.
Katesessions wraps its ItemDelegate in a MouseArea. This is not necessary, as ItemDelegate is an AbstractButton and already contains a MouseArea; the missing onEntered handler can be implemented with onHoveredChanged.
This change removes this MouseArea, reducing the complexity of the code a little by removing a level of indentation. As this requires whitespace change anyway, the extra indentation on some of the later sections of the file is also cleaned up.
Use required properties, make imports unversioned, add explicit identifiers, set componenbehavior... the kinds of things that make Qt and qmllint happy.
The applet has almost all its keyboard handling in a large onPressed handler at the root item. This works, but is rather unwieldy and blocks screen readers from working - the base ListView handling actually passes focus to the selected item which informs screen readers, while the current handling does not. Some instances of the keyboard handling are also non-functional, such as activating items by pressing enter or return.
This change moves most key handling locally into the components and leverages their built-in handling more. More specific key handlers and NeyNavigation are used where it makes sense. The general keyboard behavior is tweaked a bit (such allowing to activate the first entry by pressing enter without needing to arrow-down first) and non-functioning parts are fixed. In addition, the conditions when the selected item is reset are tweaked so that e.g. the selection is reset on closing the menu, and small a11y tweaks are made (in particular, the number of entries of sessions is read out).
An isolated fix for the broken enter key was submitted for Plasma 6.3 separately.