summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/quiview_accessibility.mm
Commit message (Collapse)AuthorAgeFilesLines
* iOS: Don't invalidate a11y whenever UI elements are added or removedTor Arne Vestbø2023-06-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The UIAccessibilityScreenChangedNotification will result in iOS resetting its state, focusing the first a11y element on the screen. We shouldn't tie clearing the a11y cache to this notification, as those are two separate actions. In the case of adding or removing individual elements, we still likely need to clear the cache, but can inform the system of the more granular UIAccessibilityLayoutChangedNotification to have it re-read the a11y tree. We still handle additions and removal of a11y elements with Window or Dialog roles as UIAccessibilityScreenChangedNotification, as these likely involve major UI changes. The implicit UIAccessibilityScreenChangedNotification on QIOSWindow destruction has been removed, as it's assumed iOS will automatically refresh its a11y tree when a UIWindow is destroyed, and in any case it's up to the individual clients of QAccessible to send the relevant QAccessibleEvent to inform about the situation. Pick-to: 6.6 6.5 Fixes: QTBUG-100094 Change-Id: If7d5cb961743e5ca97d45553b05ae5e92f82d275 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* iOS a11y: Ensure parent elements are stacked below their childrenTor Arne Vestbø2022-12-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The accessibility system on iOS does not support elements that are both accessible themselves, and act as a container for other elements. You either return YES from isAccessibilityElement, which allows you to report accessible properties for the element, or NO, in which case you can implement the informal UIAccessibilityContainer protocol to report child elements. This was confirmed in Apple Q&A session on accessibility December 14. As Qt's accessibility system allow elements that are both containers and have properties of their own, we can't build a hierarchy of elements and containers, with only the leaf elements being accessible. Instead, we let each UIView act as a UIAccessibilityContainer, and report the entire child hierarchy as a single level of sibling accessible elements. In doing so, we include elements such as the Window or Dialog that root all the accessible elements. And apparently the order that we report these elements back to iOS determine the z-order of the elements, so we need to ensure "container" elements are behind their children. Otherwise assistive technologies such as Voice Control, or the Accessibility Inspector, will not be able to target the child elements. Fixes: QTBUG-108848 Pick-to: 6.2 6.4 6.5 5.15 Change-Id: I5234bab2f14d5f368ae8c2672b051efcb80aa77d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* iOS A11Y: Do not add children of invisible parentMike Achtelik2022-03-281-1/+1
| | | | | | | | | | Prevent children from invisible parents from showing up in the a11y hierarchy. This fixes a problem on iOS which e.g. always adds hyperlink children of QML Text items, even if the Item itself is invisible. Pick-to: 6.3 6.2 Change-Id: I88a6f08956b5fe78cb789a08f2078f96d7aa263c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Don't try to initialize a11y for views that have no platform windowTor Arne Vestbø2021-11-041-0/+5
| | | | | | | | | | The window may have been destroyed, but the UIView may still be be referenced and kept alive by the a11y subsystem. Pick-to: 6.2 5.15 Task-number: QTBUG-94530 Change-Id: I24f1c9d45e80c1bb4c92536e7f91533a94fd077f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* iOS: Fix NSUInteger vs NSInteger comparison warningTor Arne Vestbø2019-08-201-1/+1
| | | | | Change-Id: I700132084c208f4ce63e0fc0516ebc3df7881ab0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* iOS Accessibility: implement accessibilityElements and check indexingFrederik Gladhorn2019-05-211-0/+8
| | | | | | Fixes: QTBUG-70683 Change-Id: I122c67a5cee22363de5c8e45dc1c83e7760162fb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Clean up our Objective-C usageJake Petroules2018-02-201-3/+4
| | | | | | | | | | | | | | | | - Move ivars into @implementation - Use instancetype where applicable - Use dot notation for property access - Use subscript operator for dictionaries and arrays - Format selectors consistently - Use proper style for init methods - Use generics instead of void pointers where possible - Use "range for" loops instead of indexing - Replace or replace IBAction/IBOutlet with void Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* iOS: Fix accessibility leakTor Arne Vestbø2017-08-091-1/+1
| | | | | Change-Id: I359ce521decbbb06376fc48689762f462c8706b0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Ignore nodes with no text name, value and description.Jan Arve Sæther2014-11-201-1/+1
| | | | | | | | | | This is in order to skip certain nodes that usually only carry structural information (such as ListItem nodes). However, because of the flattening, this structural information is never used on iOS, so we can just skip the accessible node completely. Change-Id: I17018c6565f8b39831f2d2944422c6670a438ab9 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Do not skip the parent node when flattening the hierarchy.Jan Arve Sæther2014-11-201-6/+3
| | | | | | | | | The weather app had a search field with a clear button as a child. Because of this bug it didn't report the content of the text edit (but only the clear button) Change-Id: I174c6e150e1991fa9aa2a911048590030b5ccc40 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* iOS: Add helper for getting the iOS platform integration instanceTor Arne Vestbø2014-07-211-0/+2
| | | | | Change-Id: I550d345ab0f8bcba1225c425464e198d43d9fda8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Refactor qioswindow.mm into quiview.mm and quiview_accessibility.mmTor Arne Vestbø2014-07-211-0/+115
Change-Id: Ib6297e37d67b2c0ea251ae054b8ff877af2673a5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>