vcl/Library_vcl.mk | 1 vcl/inc/accessibility/AccessibleIconView.hxx | 27 ------------ vcl/inc/iconview.hxx | 2 vcl/source/accessibility/AccessibleIconView.cxx | 50 ------------------------ vcl/source/treelist/iconview.cxx | 10 ---- 5 files changed, 90 deletions(-)
New commits: commit ebb4f072f6fd247e075d62c06f7c4bc5abb74b9c Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jul 22 14:23:17 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jul 22 19:41:18 2025 +0200 IconView a11y: Don't notify of entry focus on mouseover commit 2a28ebeef5ea3e2b01d836a7233d2316b765bf38 Date: Wed Jun 1 11:18:26 2022 +0300 Accessibility for IconView had introduced AccessibleIconView and implemented sending an ACTIVE_DESCENDANT_CHANGED event when the mouse hovers over one of the entries, in order to make the NVDA screen reader on Windows announce that item. However, ACTIVE_DESCENDANT_CHANGED events are to indicate that the corresponding entry received keyboard focus, which isn't the case, so sending that event could break focus tracking in assistive technologies. As described in more detail in [1], the non-announcement of the accessible name of the hovered IconView entry was caused by NVDA trying to retrieve a text representation via the IAccessibleText interface and not making use of the accessible name, which is effectively the same root cause as described for Orca's non-announcement for focused IconView entries with qt6 on Linux and fixed in previous commit Change-Id: Ifd1f6034e00cea9f56883830483c9b2bbc874aec Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Jul 22 12:43:29 2025 +0200 IconView/ListBox a11y: Don't support XAccessibleText w/o text Together with Change-Id: Ifda410eb2d8220361bfe161e9dcb18a4120a6806 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Jul 22 13:58:20 2025 +0200 IconView/ListBox a11y: Ignore non-children for getAccessibleAtPoint , the IconView items in Math's operator sidebar are now announced on mouseover as expected by NVDA even without the workaround to send ACTIVE_DESCENDANT_CHANGED events (if mouse tracking is enabled in NVDA settings). Therefore, drop that workaround and the now unnecessary AccessibleIconView subclass altogether. [1] https://gerrit.libreoffice.org/c/core/+/135226/comment/bd02badb_6aa060a6/ Change-Id: If388ac0e901f3581fb8cacb6e57317068bc14f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188165 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index cf2dff7ff509..b665e1c65728 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -109,7 +109,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/accessibility/accessiblebrowseboxcell \ vcl/source/accessibility/accessibleiconchoicectrl \ vcl/source/accessibility/accessibleiconchoicectrlentry \ - vcl/source/accessibility/AccessibleIconView \ vcl/source/accessibility/accessiblelistbox \ vcl/source/accessibility/accessiblelistboxentry \ vcl/source/accessibility/accessiblemenubasecomponent \ diff --git a/vcl/inc/accessibility/AccessibleIconView.hxx b/vcl/inc/accessibility/AccessibleIconView.hxx deleted file mode 100644 index a128af5009e4..000000000000 --- a/vcl/inc/accessibility/AccessibleIconView.hxx +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#pragma once - -#include <sal/config.h> - -#include "accessiblelistbox.hxx" - -class AccessibleIconView final : public AccessibleListBox -{ -public: - AccessibleIconView(SvTreeListBox& _rListBox, - const css::uno::Reference<css::accessibility::XAccessible>& _xParent); - -protected: - // VCLXAccessibleComponent - virtual void ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) override; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/inc/iconview.hxx b/vcl/inc/iconview.hxx index e868629a1966..612cefaacebe 100644 --- a/vcl/inc/iconview.hxx +++ b/vcl/inc/iconview.hxx @@ -37,8 +37,6 @@ public: void PaintEntry(SvTreeListEntry&, tools::Long nX, tools::Long nY, vcl::RenderContext& rRenderContext); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; - virtual FactoryFunction GetUITestFactory() const override; virtual void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override; typedef std::tuple<OUString&, SvTreeListEntry*> encoded_image_query; diff --git a/vcl/source/accessibility/AccessibleIconView.cxx b/vcl/source/accessibility/AccessibleIconView.cxx deleted file mode 100644 index 0ee1b253b90d..000000000000 --- a/vcl/source/accessibility/AccessibleIconView.cxx +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include <sal/config.h> - -#include <com/sun/star/accessibility/AccessibleEventId.hpp> - -#include <vcl/event.hxx> -#include <vcl/unohelp.hxx> - -#include <accessibility/AccessibleIconView.hxx> - -AccessibleIconView::AccessibleIconView( - SvTreeListBox& _rListBox, const css::uno::Reference<css::accessibility::XAccessible>& _xParent) - : AccessibleListBox(_rListBox, _xParent) -{ -} - -void AccessibleIconView::ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) -{ - if (!isAlive()) - return; - - switch (rVclWindowEvent.GetId()) - { - case VclEventId::WindowMouseMove: - if (MouseEvent* pMouseEvt = static_cast<MouseEvent*>(rVclWindowEvent.GetData())) - { - if (auto xChild = getAccessibleAtPoint( - vcl::unohelper::ConvertToAWTPoint(pMouseEvt->GetPosPixel()))) - { - // Allow announcing the element on mouse hover - css::uno::Any aNew(xChild); - NotifyAccessibleEvent( - css::accessibility::AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, {}, aNew); - } - } - break; - default: - AccessibleListBox::ProcessWindowEvent(rVclWindowEvent); - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index fb6af8428a41..aa56cf2c463e 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <accessibility/AccessibleIconView.hxx> - #include <vcl/filter/PngImageWriter.hxx> #include <vcl/toolkit/treelistentry.hxx> #include <vcl/toolkit/viewdataentry.hxx> @@ -232,14 +230,6 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n rRenderContext.Pop(); } -css::uno::Reference<css::accessibility::XAccessible> IconView::CreateAccessible() -{ - if (auto xAccParent = GetAccessibleParent()) - return new AccessibleIconView(*this, xAccParent); - - return {}; -} - FactoryFunction IconView::GetUITestFactory() const { return IconViewUIObject::create; } static OString extractPngString(const SvLBoxContextBmp* pBmpItem)