summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Fix assertion in accessibility implementation for treeviewsVolker Hilsheimer2023-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QAccessible's widget implementations, trees are treated as tables, with a rowCount implementation that is based on the view's current item content. That item content is the view's content, not the model's, and it changes when tree branches are expanded. The Cocoa bridge for accessibility allocates arrays of row data structures based on the rowCount implementation. Those data structures need to be invalidated and recreated when the view's content changes. To do that, emit an accessibility event for a model reset when laying out items changes the size of the view's item array. We don't know what changed during that layout process to makes this any more granular. Amends 11ae55e918082e8fdfc0c88c21049e877cc47b5b, but the problem with the data structure being stale and incorrect would have been there before that chain of changes optimizing. It didn't trigger an assert, but probably resulted in incorrect data being reported. To make trees testable, we need to actually expose them as AXOutline to the macOS accessibility framework. Until now, they have been treated like plain QWidget, e.g. AXGroup. This made them in practice in- accessible. With this change, VoiceOver works much better (although not perfeclty yet). Also remove an assert that could be triggered by an accessibility client asking for a cell for an invalid index (which can be reproduced by navigating around in a tree, following debug warnings from QAccessibleTree::indexFromLogical: invalid index). Pick-to: 6.5 Change-Id: I7650342aa0dcd7925a94ae6a36de5a0b344c467d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS Accessibility: optimize table interface implementationVolker Hilsheimer2023-04-111-2/+1
| | | | | | | | | | | | | | Store row and column in the QMacAccessibilityElement when creating it so that we can avoid linearly looking for ourselves in the parent's data. Row elements have their m_rowIndex set, Column elements the m_columnIndex, and elements representing a cell have both set. Cells are not managed by the table. Task-number: QTBUG-34337 Pick-to: 6.5 Change-Id: I319fad1f1fda0cfa4c0b95e9e16c25c87df04351 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Treat the accessible non-editable combobox as ButtonMenu on macOSMikolaj Boc2022-12-161-0/+2
| | | | | | | | | | | | | | Following the system design, we should treat the non-editable combobox as a ButtonMenu. All of the similar elements in macOS's UI are called ButtonMenu with the screen reader. This fixes the case when ctrl+option+space does not invoke the popup menu with options. Fixes: QTBUG-106162 Change-Id: I0b439c56d72d1fe5b32a60eb7c001f863c00adc1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* a11y: Add support for Tables in macOS bridgeJan Arve Sæther2022-11-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a11y purposes, a table needs to be mapped into a logical accessibility hierarchy. There are several ways of doing this mapping, and unfortunately macOS expects something different than what QAccessibleInterface does. So suppose we have a a 2x2 QTableView with both horizontal and vertical header like this (the names reflect the QAccessible::Role names): +-----------+--------------+--------------+ | | ColumnHeader | ColumnHeader | +-----------+--------------+--------------+ | RowHeader | Cell | Cell | +-----------+--------------+--------------+ | RowHeader | Cell | Cell | +-----------+--------------+--------------+ In order to be presented to the screen reader on a platform, it goes through two rounds of mapping: QAccessibleInterface will have all headers and cells as direct children of the table: - Table +- ColumnHeader +- ColumnHeader +- RowHeader +- Cell +- Cell +- RowHeader +- Cell +- Cell macOS expects a deeper hierarchy: - AXTable [QAccessible::Table] +- AXRow [Qt:no eqiuivalent] +- [QAccessible::Cell] (The content of the cell, e.g. AXButton, AXGroup or whatever) +- [QAccessible::Cell] (The content of the cell, e.g. AXButton, AXGroup or whatever) +- AXRow +- [QAccessible::Cell] (The content of the cell, e.g. AXButton, AXGroup or whatever) +- [QAccessible::Cell] (The content of the cell, e.g. AXButton, AXGroup or whatever) +- AXColumn (this seems to just store the geometry of the column) +- AXColumn (this seems to just store the geometry of the column) +- AXGroup (this represents the column headers) +- AXSortButton (clicking a header cell will trigger sorting) +- AXSortButton (clicking a header cell will trigger sorting) It's unclear to me how RowHeaders are mapped (they are rarer than ColumnHeaders, I expect to find them in e.g. spreadsheet applications). I haven't found any native usage of them. So this patch simply ignores them. Notice that macOS have a three layer deep hierarchy to represent a table (Table->Row->Cell), while QAccessibleInterface has a two-layer deep hierarchy (Table->Row/Cell). In the macOS bridge we therefore need to "inject" the Row/Column element to be "between" the table and the cell. The table will take ownership of all row and column elements that are children of the table. These elements are not inserted into the cache (it would be pointless, since the cache is basically just a mapping between the QAccessibleInterface -> QMacAccessibilityElement, and the row and column elements does not have a corresponding QAccessibleInterface to be mapped from). The rows and columns are therefore also created as soon as the table element is initialized, and they are stored in two NSMutableArray members of QMacAccessibilityElement. A table is constructed like any other accessibility element, with a valid axid and synthesizedRole set to nil. Each child row and column element is constructed with the same axid as the parent table element, and they will have the synthesizedRole set to either NSAccessibilityRow or NSAccessibilityColumn. With the synthesizedRole member we can then identify if we are a row, column or the actual table, and implement their respective behaviors. Notice that the child row/column is created with the parent's table axid in order for them to have a way of finding their parent table element. (there is no 'parent' member variable in QMacAccessibilityElement) This glorious scheme isn't pretty, but seems to work. Fixes: QTBUG-37207 Change-Id: I7c2451e629f5331b9a0ed61dc22c6e74a82cc173 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace QT_NO_ACCESSIBILITY with QT_CONFIG(accessibility)Allan Sandfeld Jensen2022-06-151-2/+2
| | | | | | | Pick-to: 6.4 Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@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>
* Plugins: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-05-041-1/+1
| | | | | | | Task-number: QTBUG-98434 Change-Id: If64c294033c114ae46dfc327c40da7f3c7a598f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Plugins: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-041-1/+3
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* a11y: Report mixed state if QCheckBox is PartiallyCheckedJan Arve Sæther2021-02-041-0/+2
| | | | | | | | | | Previously it only returned checked or unchecked for a tri-state checkbox. Fixes: QTBUG-84616 Pick-to: 5.15 6.0 6.1 Change-Id: Ife72098e35f8295fd389bda232de5478ffa7e87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Clean up headersTor Arne Vestbø2020-06-051-0/+3
| | | | | | | | | | | | | | The headers are now C++ clean and can be used outside of Objective-C code. All includes of Objective-C frameworks have been moved to the implementation files. Header guards have been added in the few places they were missing. All includes are now done via #include, instead of sometimes using the #import variant. Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS Accessibility: Fix role for comboboxesPeter Varga2019-11-291-1/+1
| | | | | | | Otherwise combobox with editable text field won't work. Change-Id: I135c3a63cf8fba66d724e140a5a63828853e154e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Prefix textstream operators with Qt::Lars Knoll2019-05-021-1/+1
| | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-201-1/+0
|\ | | | | | | Change-Id: I0bea38585382b5d9c8d7a013bf6bcb3a6008d159
| * Do not ignore MenuItem on macOSJan Arve Saether2018-04-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | The idea was probably to ignore it since macOS already provides accessibility for a menu item in its native system menu. However, a Qt Quick Controls2 Menu will instead show a non-native menu, which should not be ignored. Task-number: QTBUG-63522 Change-Id: Ib5ae16ad991ebd7a18fa73b8f576f20b1c14d4c8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Cocoa QPA: Clean up 0 as pointerGabriel de Dietrich2018-04-191-1/+1
| | | | | | | | | | | | | | | | We use nil for Objective-C null pointers and nullptr everywhere else, including CoreFoundation and similar opaque types. Change-Id: Id75c59413dec54bf4d8e83cf7ed0ff7f3d8bb480 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Clean up our Objective-C usageJake Petroules2018-02-201-3/+3
|/ | | | | | | | | | | | | | | | - 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>
* Remove remaining Carbon includes from QtCore, QtGui and QtWidgetsJake Petroules2017-03-071-3/+1
| | | | | | | | | Carbon is deprecated and we should not rely on it at runtime or compile time. These headers were only included for a small collection of keyboard key constants which have now been hardcoded instead. Change-Id: Ia2eaa267584b63be8019be3bbf64cba897a985a8 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Replace QCFString::to(CF/NS/Q)String usage with QString methodsTor Arne Vestbø2016-10-061-3/+3
| | | | | | | | Slims down QCFString and leaves only one implementation of converting back and forth between CF/NS strings and QStrings. Change-Id: I068568ffa25e6f4f6d6c99dcf47078b7a8e70e10 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also reverts commit 018e670a26ff5a61b949100ae080f5e654e7bee8. The change was introduced in 5.6. After the refactoring, 14960f52, in 5.7 branch and a merge, it is not needed any more. Conflicts: .qmake.conf src/corelib/io/qstandardpaths_mac.mm src/corelib/tools/qsharedpointer_impl.h tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If4fdff0ebf2b9b5df9f9db93ea0022d5ee3da2a4
| * Merge remote-tracking branch 'origin/5.6.0' into 5.6Liang Qi2016-02-151-1/+1
| |\ | | | | | | | | | Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
| | * Accessibility OS X: protect from accessing invalid objectsFrederik Gladhorn2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually when getting an object from an interface, the object can be assumed to be valid. We need to check isValid though since the screen reader access is inherently asynchronous and objects might be in the QWidget destructor where the QObject is still valid. Thus check QAccessibleInterface::isValid in all uses of it in the OS X implementation. Task-number: QTBUG-50545 Change-Id: I6e142f6ead1b3281cab2cbc61ce1406bbfe29f69 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-10/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * | Accessibility OS X: Improve password handlingFrederik Gladhorn2016-02-041-10/+17
| |/ | | | | | | | | | | | | | | | | Set the right sub role (NSAccessibilitySecureTextFieldSubrole) and return the bullet point character for the text contents. This alignes the behavior with native widgets. Change-Id: I7305e08dca61097dd8c050aed64c792c06de0a4d Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | 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>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-081-0/+2
|\| | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * Respond with a sound for certain message boxes on windowsJan Arve Saether2015-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression (it worked in 4.8) that was probably introduced by the refactoring of the accessibility framework in Qt 5. Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called regardless of isActive(), so its the responsibility of each implementation of notifyAccessibilityUpdate() to check for isActive() where it matters. Task-number: QTBUG-33303 Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/io.pri src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/network/socket/qabstractsocket.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro tests/auto/dbus/qdbusconnection/qdbusconnection.pro tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
| * Fix QT_NO_ACCESSIBILITY build on OS XLiang Qi2015-09-111-0/+4
| | | | | | | | | | Change-Id: Id8b41787fb9f50296ee9e0ad1f108418565d9325 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Accessibility: OS X: static text should have value instead of titleFrederik Gladhorn2015-08-221-0/+4
|/ | | | | | | | | VoiceOver adds ", text" when reading QLabel when the Title instead of the Value attribute is set. Change-Id: Ic8f94844e858e490ec7e52856dccd4c0a09df88b Reviewed-by: Boris Dušek <me@dusek.me> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-03-241-0/+5
|\ | | | | | | Change-Id: If5d2e621c2fa5476c3ab687a3f4620c54fc3b32e
| * Fixed compilation on Mac OS X (qt namespace and preprocessor issues))Sergei Kulik2015-03-201-0/+5
| | | | | | | | | | | | | | | | Configured with -qtnamespace <...> -no-opengl -D QT_NO_PRINTER Change-Id: I1c959a89afda08d29a854f21e6e51732d136753c Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | OS X Accessibility: Make checkboxes etc. checkable with VoiceOverBoris Dušek2015-03-131-3/+7
|/ | | | | | | | | | | | NSAccessibility has no explicit analog for QAccessibleActionInterface::toggleAction(), checking checkboxes/radio buttons is handled by NSAccessibilityPressAction. So ensure exposing the action properly on OS X so that VoiceOver users can check/uncheck checkboxes, select radio buttons etc. Change-Id: I54b47515cc4882ecf0544c7351bd3c9046023a44 Task-number: QTBUG-44852 Reviewed-by: Jan Arve Sæther <jan-arve.saether@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>
* Add searchEdit as accessible stateFrederik Gladhorn2014-10-251-3/+14
| | | | | | | The search state is used by VoiceOver on iOS to announce a search field. Change-Id: I464125827dbbf275daf38104e26e9591bb23365a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* Accessibility OS X: Fix image roleFrederik Gladhorn2014-09-231-0/+1
| | | | | Change-Id: I0839a30041dbe558c420c944da49abe8ea26e0ab Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Add accessible rolesFrederik Gladhorn2014-08-131-0/+6
| | | | | Change-Id: Ic5465687f51c441235ec23cb88045e14644f1d2a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Add accessible roles for web document, paragraph and sectionFrederik Gladhorn2014-07-231-0/+3
| | | | | | | | These roles seem wide-spread enough that it makes sense to add them. QtWebEngine will use them. Change-Id: I9c2d6ab23ada0607078bcd407a72ecae9f87eeea Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* QAccessible::PushButton is deprecated in favor of just ButtonFrederik Gladhorn2014-07-101-1/+1
| | | | | | Change-Id: I2878a28f18f3a004705ec50f616846f6cd00eed1 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Accessibility: Improve handling current valueFrederik Gladhorn2014-07-071-1/+1
| | | | | | | | | Value interfaces on OS X and iOS can be strings, so can the value property of MSAA. Before we'd always only send doubles, instead change it to use strings as well. Change-Id: I1b4410c68238ba7a69a5507d87c251f2ac61c568 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Accessibility iOSFrederik Gladhorn2014-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | This lays the foundation for iOS accessibility. The approach is slightly different from other a11y bridges in that we completely flaten the hierarchy of wigets/quick items to a list. This works well with VoiceOver since there are comparatively few elements. The cache implementation for OS X is re-used. With this patch VoiceOver on iOS works on many applications out of the box. For now it sends the screen changed notfification somewhat overzealous, that will need revisiting and potentially new API in QAccessible. Device orientation changes are not yet supported. [ChangeLog][iOS] Accessibility was added to the iOS platform port. This enables Qt applications to be read by VoiceOver on iOS devices. Task-number: QTBUG-39097 Change-Id: I441e844652d528cc2fdcc444f43b54ed6fa04f0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Accessibility Mac: Cache Accessible Elements and Notify about changesFrederik Gladhorn2014-04-091-14/+29
| | | | | | | | | | | | | | | The big change is that we now keep the id objects representing accessibles around so that they are persistent for ATs. This improves performance of Mac accessibility significantly. This is required for notifications which are now sent so that many things work much better, for example the VoiceOver focus follows the keyboard focus. The parent element in QCocoaAccessibleElement was removed, we can dynamically access it more reliably. Change-Id: I686d212f40d28b392dcc22f16f3c3430f08bdc98 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Accessibility Mac: CheckBoxes need value attributeFrederik Gladhorn2014-03-291-1/+6
| | | | | | | Task-number: QTBUG-37921 Change-Id: I305f983f2fd96b52960060351402ff70a62c3a91 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Mac: fix role for linksFrederik Gladhorn2014-03-191-1/+1
| | | | | Change-Id: Ied4dd0bf112f36065da4063857898ca4bd0eb77b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Remove empty QAccessible2 headerFrederik Gladhorn2013-11-201-2/+1
| | | | | Change-Id: Ia5e9b1adf9280e6b7d7aaf8cb5b5167b694a6070 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: Make it possible to send events with no QObjectFrederik Gladhorn2013-10-251-7/+3
| | | | | Change-Id: Icbb9d15ec52ff5f7718eaf3600cab140971274aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Avoid a potential crash in unignoredChildrenJan Arve Saether2013-08-091-2/+1
| | | | | | | | | | This doesn't actually fix the source of the problem, but its harmless. This was reproduced with tst_qcolumnview and voiceover enabled Task-number: QTBUG-32440 Change-Id: Iad27884e1ca9194f911271c16908ef358e4b1875 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>