┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistviewaccessible.cpp
AgeCommit message (Collapse)Author
2024-10-28Overhaul main view accessibilityFelix Ernst
This commit brings the main view of Dolphin into a usable state accessibility-wise. Users of screen readers should have a way better experience while browsing files and folders and navigating along the file system hierarchy. This commit fixes most of the remaining already-identified accessibility issues listed in https://invent.kde.org/teams/accessibility/collaboration/-/issues/28, but not all. Namely, these should now be fixed: 1. Orca should read the element type in dolphin (file, folder, device, link to folder, link to file) 2. Orca should read complete label in icon and compact view mode, currently it only speaks the name, but there could be additional information like the number of elements or the file size. 3. Orca is not able to announce Selecting / Unselecting files in Dolphin. It also never announces how many items are selected in total. (Announcing the total selection can be done by reading out the view element or by pressing the Tab key to get to the status bar with the relevant information.) 4. Dolphin opens on the home directory, but Orca doesn't tell you so. Consider enclosing the area in a frame/panel which updates its accessible name each time you modify the current path by entering or leaving a directory. 5. I don't know what the folder presentation widget is, but it should be presented as a grid view. Currently, we have a terrible experience because the entire row of folders is read at once, with no indication that we can move left and right with the arrows to go between the elements of a row. When I found that out, however, I discovered that when you're on the last icon of the first row and press right arrow, you get to the first icon of the next row, but that's not announced, instead, the whole row is announced at once 6. Orca should announce the current elements instead of "layered pane" when the Folder / File view gets the focus in dolphin 7. Orca reads only name in Table View only of Dolphin 8. Items are sometimes confusingly announced as "collapsed" in contexts in which there is no concept of collapsing/expanding e.g. in icon view mode. A lot of code was moved around and renamed. The three accessibility classes, which all used to be in the same file, are moved into separate files. *Acknowledgement* Thanks to Christian Hempfling and bgt lover for testing as well as originally identifying a lot of the pain points being addressed here. This work is part of a my project funded through the NGI0 Entrust Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology. https://kde.org/announcements/2024_ngi_openletter/
2023-10-05Merge branch 'master' into kf6Nate Graham
2023-10-05Fix accessibility ancestor treeFelix Ernst
Before this commit, KItemListViewAccessible would always return nullptr as its parent. This meant that accessibility software would have to guess to which window/hierarchy the KItemListView belongs to. Guessing shouldn't be necessary here. This commit makes sure that the KItemListView always returns a sensible parent in the accessible hierarchy. It does so by explicitly setting the accessible parent for every KItemListView after construction in the DolphinView contructor. Since KItemListView now always knows about its accessible parent, the accessibleInterfaceFactory can always ask the KItemListView for that information when constructing the QAccessibleInterfaces. Fixes https://invent.kde.org/system/dolphin/-/issues/47.
2023-09-10Replace qAsConst with std::as_constMéven Car
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2021-12-28kitemlistview: Port KItemListView::itemAt to std::optionalFushan Wen
Use `value_or(-1)` for those functions that don't use `std::optional`.
2020-10-23Compile without foreachAlexander Lohnau
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-02-18Fix crash during shutdownDavid Hallas
Summary: Fix crash during shutdown. The root cause is that when Dolphin in stopped as part of an activity, the KItemListViewAccessible destructor is called after QApplication::exec has returned causing Qt to already having cleaned up the QAccessibleInterface instances kept in KItemListViewAccessible. Instead of storing the pointers to QAccessibleInterface we store the QAccessible::Id so that we can use the QAccessible::deleteAccessibleInterface function for deleting the instances. BUG: 402784 Test Plan: I wasn't able to reproduce the crash in the first place, but I have just opened and closed Dolphin a few times and verified the the QAccessibleInterface instances are correctly cleaned up. Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19083
2018-07-18Fixes memory leak in KItemListViewAccessibleDavid Hallas
Summary: The KItemListViewAccessible class has a list of QAccessibleInterface pointers in a member variable m_cells. The problem is that when new entries are created, the newly allocated pointer is not stored in the list, only a nullptr is store, this renders the cleanup code in the destructor useless. This patch simply stores the pointer in the list, causing the destructor to correctly free the memory. Test Plan: I found this issue using address sanitizer. Simply building Dolphin with -fsanitize=address and opening a window caused the memory leak. Reviewers: #dolphin, jtamate, elvisangelaccio Reviewed By: #dolphin, jtamate, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D14168
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2016-04-09Fix crash caused by a out-of-bounds access in KItemListViewAccessible::cellEmmanuel Pescosta
BUG: 359738 FIXED-IN: 16.04.0 REVIEW: 127397
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-02-06Fix includesMontel Laurent
2015-02-06Fix includesMontel Laurent
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-08-10Port accessibility to Qt 5Frederik Gladhorn
REVIEW: 119428
2013-10-30Store the selected items in a more efficient wayFrank Reininghaus
Since Dolphin 2.0, we have stored the selected items in a QSet<int>, which is neither space-efficient nor particularly fast when inserting many items which are in a consecutive range. This commit replaces the QSet<int> by a new class "KItemSet", which stores the items in a sorted list of ranges. For each range, we only store the first index and the length of the range, so we need a lot less memory for most common selection patterns, and we also save quite a few CPU cycles in many situations, because adding an item to the KItemSet will in many cases not need a memory allocation at all, and it's particularly easy when inserting sorted items into the KItemSet in a row. KItemSet contains a minimal subset of QSet's API which makes it suitable as a drop-in replacement for our needs. It also has iterators, such that the items can be iterated through easily, also with foreach. One advantage of KItemSet compared to QSet<int> is that the items are always iterated through in ascending order. REVIEW: 113488
2013-04-23Do not dereference null pointer in KItemListViewAccessibleFrank Reininghaus
BUG: 316285 FIXED-IN: 4.10.3
2012-10-30Fix some indentation issuesFrank Reininghaus
2012-09-26Adding license header in kitemlistviewaccessibleAmandeep Singh
Added the license header in kitemlistviewaccessible.* Accessibility headers not included when QT_NO_ACCESSIBILITY defined Removed unnecessary debug statement
2012-09-25Fix coding style and unnecessary complexity in KItemListViewAccessibleFrank Reininghaus
CCMAIL: [email protected] CCMAIL: [email protected]
2012-09-25Removing layouter from public, adding TableModelChanged updateAmandeep Singh
REVIEW : 106555
2012-09-23Removing unneccessary case for Sibling in navigateAmandeep Singh
2012-09-22Make cell indices work.Frederik Gladhorn
2012-09-22Accessibility: Fix cellAtFrederik Gladhorn
Row and column are 0 based, the cell function uses 1 based indices.
2012-09-22Returning correct rowCount.Amandeep Singh
2012-09-22Making code confirm to policyAmandeep Singh
2012-09-22Removing in-class functions and unnecessary destructorAmandeep Singh
2012-09-22Modify code according to dolphin policyAmandeep Singh
2012-08-14Correcting code according to KDE PolicyAmandeep Singh
2012-08-14Reverting KListSelectionManager, removing unneccessary a11y factoriesAmandeep Singh
2012-08-14Remove unneccessary dependency and polish the Accessibility InterfacesAmandeep Singh
2012-08-14Minor fixes to accessible interfacesAmandeep Singh
2012-08-14Focus-tracking for widgets in Dolphin View now works.Amandeep Singh
Added the calls to updateAccessibility, for DragDrop & Focus scenarios
2012-08-14Improving Accessibility implementationAmandeep Singh
2012-08-14Accessibility: Implement rect for cells and view.Frederik Gladhorn
Remove comparison of QAccessibleInterfaces - these are pointers that get instantiated again and again, so they cannot be compared. Use the object() function in QAI instead for comparison.
2012-08-14Renaming the a11y classes and adding implementationAmandeep Singh
2012-08-14Do not claim HasInvokeExtension.Frederik Gladhorn
This leads to crashes since it implies that casting to QAccessible2Interface is valid.
2012-08-14Remove some dubious code for now (crash less)Frederik Gladhorn
2012-08-14Add some fixmes, comment out broken rect()Frederik Gladhorn
2012-08-14Remove reimplementation of functions.Frederik Gladhorn
The base class implementations are actually good and without some problems. Save one pointer's worth of memory by not having m_container. rect was returning a relative rectangle always. State was wrongly returning HasInvokeExtension which can lead to crashes.
2012-08-14Remove unused function.Frederik Gladhorn
And also bad use of "" instead of QString().
2012-08-14Use KDebug in favor of qdebug.Frederik Gladhorn
2012-08-14Fix parent navigation for KItemListContainerAccessible.Frederik Gladhorn
2012-08-14Adding the Accessibility classesAmandeep Singh