]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistcontroller.cpp
GIT_SILENT made messages (after extraction)
[dolphin.git] / src / kitemviews / kitemlistcontroller.cpp
index 821e1b75fea1ff100bd96d22a81c58092a44d29e..1db665f47afa3e2279152dc1941cac5c404bf179 100644 (file)
@@ -467,6 +467,12 @@ bool KItemListController::keyPressEvent(QKeyEvent *event)
 
     case Qt::Key_Space:
         if (m_selectionBehavior == MultiSelection) {
+#ifndef QT_NO_ACCESSIBILITY
+            // Move accessible focus to the item that is acted upon, so only the state change of this item is announced and not the whole view.
+            QAccessibleEvent accessibilityEvent(view(), QAccessible::Focus);
+            accessibilityEvent.setChild(index);
+            QAccessible::updateAccessibility(&accessibilityEvent);
+#endif
             if (controlPressed) {
                 // Toggle the selection state of the current item.
                 m_selectionManager->endAnchoredSelection();