X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2328cb7f923e5c6eeb7617eebf3ee73c0bb8e50b..52da2dc809cde43d2ada7b76e014dd4fee5b62c3:/src/dolphinviewcontainer.cpp diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index c89621dbd..62c29a1fc 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -33,6 +33,9 @@ #include #include +#ifndef QT_NO_ACCESSIBILITY +#include +#endif #include #include #include @@ -436,6 +439,14 @@ void DolphinViewContainer::showMessage(const QString &message, KMessageWidget::M m_messageWidget->hide(); } m_messageWidget->animatedShow(); + +#ifndef QT_NO_ACCESSIBILITY + if (QAccessible::isActive() && isActive()) { + // To announce the new message keyboard focus must be moved to the message label. However, we do not have direct access to the label that is internal + // to the KMessageWidget. Instead we setFocus() on the KMessageWidget and trust that it has set correct focus handling. + m_messageWidget->setFocus(); + } +#endif } void DolphinViewContainer::readSettings()