summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/accessibility
AgeCommit message (Collapse)AuthorFilesLines
13 days[API CHANGE] a11y: Use XAccessible for relation targetsMichael Weghorn1-1/+1
Use a Sequence of XAccessible rather than its base interface XInterface for AccessibleRelation's TargetSet. As the targets are accessible objects as well, anything other than XAccessible doesn't make much sense. Using XAccessible right away makes that clearer and avoids the need to query the XAccessible interface. (The winaccessibility bridge was already using `static_cast`, relying on the fact that the objects are XAccessibles.) The a11y UNO API is not published, so an API change should be unproblematic. Change-Id: I7f08e98d1ec303d5343d9a7954187cdd71495ebc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166586 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
13 daysa11y: Drop note about API being "not yet published"Michael Weghorn1-1/+0
The note about `XAccessibleMultiLineText` being "not yet published" can be misleading, as there's no plan to publish it. All a11y API was unpublished in commit 70626249cd247d9acdad417b8eaf252bae22c059 Date: Thu Nov 29 00:27:03 2012 +0100 API CHANGE a11y unpublishing and add/removeListener rename. The a11y API has never really been picked up by tools vendors, let's not tie ourselves up here for no good reason. This unpublishes all css::accessibility, and dependend API. With that, we can change the rather unfortunately-named add/ removeEventListener to be add/removeAccessibleEventListener, thus not conflicting with the XComponent methods of the same name. Change-Id: I595598c3a8e46415f80b2780f333333174865fe4 There's currently no plan to change that, so drop that note. (Public a11y API is the corresponding platform a11y API and it's LO's responsibility to bridge to that.) Change-Id: I72a3d3be71f68663497364747f143e856d0b80ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166587 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-04-23Fix XAccessibleSelection::getSelectedAccessibleChild docMichael Weghorn1-1/+1
The valid indices to pass as params to `XAccessibleSelection::getSelectedAccessibleChild` depend on the the number of selected children, i.e. the return value of `XAccessibleSelection::getSelectedAccessibleChildCount`. The previously mentioned `XAccessibleRelationSet::getAccessibleChildCount` doesn't even exist. Change-Id: Iaabbc9e3972c7a8274495e19978db9eae36077fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166466 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-04-04a11y: Fix XAccessible{Editable,Multiline}Text docMichael Weghorn2-3/+3
Fix typos and slightly improve wording. Change-Id: Ib58dcb4d6039a55ade76d12d5fed33f4eac84776 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165792 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-29Create an UNO service to do the symbol lookup in toolkit::AccessibilityClientNoel Grandin1-0/+38
which means I can remove one usage of gb_Library_set_plugin_for, which is blocking linking the accessibility module into --enable-mergelibs=more Change-Id: I8664ae1d2da4526cc7eab79b36e1589eb391d7c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163680 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-14Fix typoAndrea Gelmini1-1/+1
Change-Id: Idcfcd6aca1c74cb3e10dac09cd347b69a9bdb949 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159406 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-14tdf#123864 a11y: Add new AccessibleStateType::CHECKABLEMichael Weghorn1-0/+6
Both, AT-SPI and IAccessible2 have a CHECKABLE state that describes whether an item is checkable, i.e. whether it can be checked, i.e. whether it is possible that this object can have the CHECKED state. So far, LibreOffice didn't have any equivalent, and e.g. a checkbox that is ticked would report state CHECKED but not CHECKABLE, which is inconsistent. ("How can an object that is not checkable be checked?") For an unchecked object, the fact that it can be checked is unclear since that one will just have the CHECKED state not being present. Introduce a new a11y state, `AccessibleStateType::CHECKABLE` with the same semantics as in AT-SPI and IAccessible2 to bridge the gap. Map the state in winaccessibility (to IAccessible2), gtk3 and an the Qt-based VCL plugins, which are responsible for mapping to AT-SPI. While Qt has an equivalent state flag, it currently doesn't map that to AT-SPI yet. Pending upstream Gerrit change to implement that: [1] The gtk4 a11y API doesn't have a direct equivalent and will be handled separately in a following commit. Reporting the new state where applicable will be implemented in following commits. [1] https://codereview.qt-project.org/c/qt/qtbase/+/517844 Change-Id: I6aa7fec3b3bd728a5cfedcdc8d6b66f06337f7ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159382 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn1-0/+8
A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-24Fix typoAndrea Gelmini1-2/+2
Change-Id: Iac1d0f9a00fe5ccab84da1f1fb033354920341fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158366 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
2023-10-23a11y: Make XAccessibleValue doc more consistentMichael Weghorn1-11/+10
* Align the method names in the documentation to what the acual methods are called (e.g. `getMaximumValue`, not `getMaximumAccessibleValue`). * Use "minimum" and "maximum" consistently, not "minimal" and "maximal" in some places. Change-Id: Idf4f36dca118a614b04a4b958e97d225f70dde0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158347 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-21a11y: Improve XAccessibleExtendedAttributes docMichael Weghorn1-1/+1
The existing // MT: I guess it's not formula only? comment was justified. `XAccessibleExtendedAttributes::getExtendedAttributes`, is not only used to report formulae, but e.g. used to report a heading level by Writer paragraphs (s. `SwAccessibleParagraph::getExtendedAttributes`), so adjust the documentation and align it with the `IAcccessible2::attributes` one [1] that also uses the cell formula as an example. [1] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible2.html#a0d51b0c189a000ee3b6ddf7f68da2009 Change-Id: I2d6f38911c3802edb55f9426a35b8986dd6e399a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158259 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-08a11y: Drop extra "no" in XAccessibleComponent docMichael Weghorn1-1/+1
Change-Id: I32870920d3eacf8c557870abf4a243bb1ba9f584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155454 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-27a11y: Clarify AccessibleEventId::ROLE_CHANGED docMichael Weghorn1-0/+5
Mention that old and new value don't need to be set in this kind of event and how the new role can be retrieved. Change-Id: Iefde16a91b71af87feccb5ec2e6a32e682d60b4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154987 Reviewed-by: Colomban Wendling <cwendling@hypra.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-05-04tdf#105404 [API CHANGE] add index to accessiblity change eventNoel Grandin1-0/+7
Which shaves 80% off the time off breaking up a vector image on Linux. Change-Id: Id8e7daad001b6120d1fb98e382357da5b55e92ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151352 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-21There is no XAccessibleStateTypeTor Lillqvist1-2/+2
What is meant is surely AccessibleStateType. Change-Id: I57903dd7e1eb9b0a3cac42a96633093569f770eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149194 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-16Remove false documentationTor Lillqvist1-4/+0
There are no such duplicated constant labels in this file. Change-Id: I6352766834bf832667b5644d7507ec250932492a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148976 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-09-26Add some missing @since tagsStephan Bergmann1-0/+4
...for constants introduced with 4917430c1c5e8105987e81d65d31df21955ad60e "tdf#116542 a11y: introduce STATIC role" and 947fe0d89dee75ee43515ef7dfb43837d65a45bc "tdf#119788 tdf#117173 add accessibility NOTIFICATION role", resp. Change-Id: I1533f3bfcac5e7014078dd891dc05571f1186bb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140587 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-26tdf#119788 tdf#117173 add accessibility NOTIFICATION roleJim Raykowski1-0/+7
and use it to make screen readers announce notifications from the 'Find and Replace' dialog Change-Id: Ifcf9304883e2e824ea1b7998d7767e474b87c8b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139709 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-09-02[API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bitMichael Weghorn3-11/+11
With 16k column support in Calc enabled by default in commit 4c5f8ccf0a2320432b8fe91add1dcadf54d9fd58 Date: Tue Mar 8 12:44:49 2022 +0100 change default Calc number of columns to 16384 (tdf#50916) , the number of Calc cells in a spreadsheet is larger than SAL_MAX_INT32, meaning that a 32-bit a11y child index is no more enough and using it resulted in integer overflows in methods handling corresponding Calc cells in the a11y layer. This e.g. had the effect of the Orca and NVDA screen readers not announcing focused or selected cells properly when their a11y child index was out of the 32-bit integer range. Switch the internal a11y child indices to 64 bit to be able to handle this properly internally. Since the platform APIs (at least AT-SPI on Linux and IAccessible2 on Windows; from what I can see LO's macOS a11y bridge doesn't directly expose the child index) are still restricted to 32 bit, larger child indices still cannot be exposed via the platform APIs. As a consequence, use of the the IAccessible2 and AT-SPI methods that use the child index remains problematic in those cases where the child index is larger. However, as an alternative to using the AT-SPI Table interface and the IAccessibleTable/ IAccessibleTable2 interfaces with the child index to retrieve information about a specific cell, both AT-SPI and IAccessible2 also provide interfaces to retrieve that information directly from the cell object (TableCell interface for AT-SPI, IAccessibleTableCell for IAccessible2). Those interfaces are already implemented/exposed for winaccessibility (s. `CAccTable`) and the qt5/qt6/kf5 VCL plugins (s. the `QAccessibleTableCellInterface` methods implemented in `QtAccessibleInterface`). With the switch to 64-bit internal a11y child indices, these now behave correctly for cells with a child index that doesn't fit into 32 bit as well. NVDA on Windows already uses the IAccessibleTableCell interface and thus announcing focused cells works fine with this change in place. Orca on Linux currently doesn't make use of the AT-SPI TableCell interface yet, but with a suggested change to do so [1], announcement of selected cells works with the qt6 VCL plugin with a current qtbase dev branch as well - when combined with the suggested changes to implement support for the AT-SPI TableCell interface in Qt [2] [3] and the LO change based on that [4] and a fix for a nullptr dereference [5]. The gtk3 VCL plugin doesn't expose the AT-SPI TableCell interface yet, but once it does so (via `AtkTableCell`), it also works with the suggested Orca change [1] in place. (Adding that is planned for an upcoming change, works with a local WIP patch.) For handling return values that are larger than what platform APIs support, the following approach has been chosen for now: 1) When the return value is for the count of (selected) children, the maximum value N supported by the platform API is returned. (This is what `ScAccessibleTableBase::getAccessibleChildCount` did previously.) The first N elements can be accessed by their actual (selection) indices. 2) When the return value is the child/cell index, -2 is returned for objects whose index is greater than the maximum value supported by the platform API. Using a non-negative value would mean that the index would refer to *another* actually existing child. A child index of -1 on the other hand tends to be interpreted as "child is invalid" or "object isn't actually a child of its (previous) parent any more)". For the Orca case, this would result in objects with a child index of -1 not being announced, as they are considered "zombies" [6]. What's still somewhat problematic is the case where more than 2^31 children are *selected*, since access to those children still happens by the index into the selection in the platform APIs, and not all selected items are accessible this way. (Screen readers usually just retrieve the first and last element from the selection and announce those.) Orca already seems to apply different handling for the case for fully selected rows and columns, so "All cells selected" or "Columns ... to ... selected" is announced just fine even if more than 2^31 cells are selected. (Side note: While Microsoft User Interface Automation - UIA - also uses 32-bit indices, it also has specific methods in the ISelectionProvider2 interface that allow to explicitly retrieve the first and last selected item, `ISelectionProvider2::get_FirstSelectedItem` and `ISelectionProvider2::get_LastSelectedItem`, but we currently don't support UIA on Windows.) Bound checks at the beginning of the methods from the `XAccessibleContext`, `XAccessibleSelection` and `XAccessibleTable` interfaces that take a child index (or in helper methods called by those) should generally already prevent too large indices from being passed to the methods in the lower layer code that take smaller integer types. Such bound checking has been been added in various places where it wasn't present yet. If there any remaining issues of this kind that show after this commit, they can probably be solved in a similar way (s.e.g. the change to `AccessibleBrowseBox::getAccessibleChild` in this commit). A few asserts were also added at places where my understanding is that values shouldn't be larger than what is supported by a called method anyway. A test case will be added in a following change. [1] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/131 [2] https://codereview.qt-project.org/c/qt/qtbase/+/428566 [3] https://codereview.qt-project.org/c/qt/qtbase/+/428567 [4] https://gerrit.libreoffice.org/c/core/+/138750 [5] https://codereview.qt-project.org/c/qt/qtbase/+/430157 [6] https://gitlab.gnome.org/GNOME/orca/-/blob/82c8542002e36e0d3d918088d583162d25136143/src/orca/script_utilities.py#L5155 Change-Id: I3af590c988b0e6754fc72545918412f39e8fea07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139258 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-31a11y: Remove historical Calc table dimensions from XAccessibleTable docMichael Weghorn1-3/+3
The mention of Calc tables having 256 columns and 32000 rows is a bit outdated. I actually started looking here because with 16k columns, the 32-bit a11y child indices aren't sufficient for all cells anymore... (tdf#150683) Also remove duplicated words. Change-Id: Id707d56e3947c727811259d5f1c46a7f136efc40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139113 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-26a11y: Align SELECTION_CHANGED_REMOVE doc with realityMichael Weghorn1-2/+2
While the documentation for `AccessibleEventId::SELECTION_CHANGED_REMOVE` said that the removed item is set in `AccessibleEventObject::OldValue`, all places that set the removed item in that type of event actually set it in `AccessibleEventObject::NewValue` and e.g. winaccessibility's `AccContainerEventListener::HandleSelectionChangedRemoveEvent` also handles the event with that assumption, so adapt the doc accordingly. (There are also various places that send `SELECTION_CHANGED_REMOVE` events without setting any of the two.) Change-Id: Ib49068715d9436a99e79d13f2c9720a52a094a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138881 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-11a11y: Fix XAccessibleComponent::getAccessibleAtPoint docMichael Weghorn1-3/+3
The mention of a `TRUE` value when the return type is an `XAccessible` rather than a boolean looks like a copy-paste error from the `XAccessibleComponent::containsPoint` doc just above. While at it, also fix a typo present in both. Change-Id: I9b597f3e500c7f4e448e228ebc27c45d8dc420a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138095 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-04a11y: Add missing "not" in XAccessibleText::getTextBehindIndex docMichael Weghorn1-1/+1
The doc was contradicting itself, saying (emphasis added): > Returns the substring of the specified text type that is > located after the given character and DOES NOT INCLUDE IT. and > For example, if text type is > AccessibleTextType::WORD, then the complete word > that is closest to and LOCATED BEHIND nIndex is returned. but also > The index character WILL BE PART of the returned string. Add the missing "not" to the latter to make this consistent and match the observed behavior when testing this with a Writer paragraph consisting of the characters "abcdefg": Calling `getTextBehindIndex(2, css::accessibility::AccessibleTextType::CHARACTER)` on the corresponding a11y object's `XAccessibleText` interface returns a TextSegment with * "d" as text * a start offset of 3 * an end offset of 4 This is also consistent with `XAccessibleText::getTextBeforeIndex`, whose documentation is similar and includes the "not" at the corresponding place. Calling `getTextBeforeIndex(2, css::accessibility::AccessibleTextType::CHARACTER)` returns a TextSegment with * "b" as text * a start offset of 1 * an end offset of 2 The commit message of the commit adding this suggests that the semantics were changed at some point, maybe the doc just wasn't updated to reflect this at this one place back then. commit 161503a286e6f7e1be49f84d9ad6a6287bac486e Date: Thu Apr 24 16:36:13 2003 +0000 INTEGRATION: CWS uaa02 (1.1.2); FILE ADDED 2003/04/08 11:43:30 af 1.1.2.6: #108113# Made validity of index 'length' implementation dependent for getCharacterBounds(). 2003/04/08 10:04:41 af 1.1.2.5: #108113# Added a sequence of requested attributes to getCharacterAttributes(). 2003/04/04 14:37:30 af 1.1.2.4: #i12332# Made position <length> a valid character for method getCharacterBounds(). -> 2003/03/18 15:59:07 af 1.1.2.3: #108113# Changed the semantics of getText{Before,At,After}Index(). 2003/03/14 10:40:54 af 1.1.2.2: #108113# Removed references to the drafts directory. 2003/03/11 15:00:42 af 1.1.2.1: #108113# Moved from drafts/com/sun/star/accessibility. Change-Id: I4a3e73829f03c79977cef7542ff59603ea10c6dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137800 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-07-08[API CHANGE] Drop css::accessibility::XAccessibleStateSetNoel Grandin3-135/+42
which is internal API, unused (as far as I can tell) by external users. This state is purely a bitset (as implemented by utl::AccessibleStateSetHelper) so we can just return it as a 64-bit value. This shaves significant time off the performance profiles of code that loads very complex shapes, because this state is frequently used, and we no longer need to allocate a return value on the heap for every call. Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-13Drop obsolete preprocessor directives from UNOIDL filesStephan Bergmann43-321/+0
...which were used by ildc, which is gone since a8485d558fab53291e2530fd9a1be581c1628deb "[API CHANGE] Remove deprecated idlc and regmerge from the SDK", and have always been ignored as legacy by its unoidl-write replacement. This change has been carried out (making use of GNU sed extensions) with > for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl which apparently happened to do the work. (The final two files are not UNOIDL source files.) Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-29a11y: Drop unused, deprecated table model change event typesMichael Weghorn1-23/+0
All places that were previously emitting `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` events have been ported to emit the 4 new event types introduced in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" instead. Therefore, the handling of those events can be dropped from the gtk3 VCL plugin and for macOS's a11y listener as well. Also, drop the now completely unused constants from the IDL file as mentioned in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89: > From a UNO API perspective, this change > and the final removal of the > `AccessibleTableModelChangeType::DELETE` > and `AccessibleTableModelChangeType::INSERT` > constants in a follow-up commit > should be unproblematic, because the > corresponding APIs have been unpublished in > > commit 70626249cd247d9acdad417b8eaf252bae22c059 > Date: Thu Nov 29 00:27:03 2012 +0100 > > API CHANGE a11y unpublishing and add/removeListener rename. Change-Id: I1c062e26481b916af882e301c5f911aba9550ea3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132221 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29a11y: Add new table model change types for row/col insertion/delMichael Weghorn2-7/+61
So far, there were two types/constants to use in an `AcessibleTableModelChange` event to indicate the insertion or deletion of rows and/or columns. From `offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl`: > /** One or more rows and/or columns have been inserted. > > <p>Use the fields of the AccessibleTableModelChange > structure to determine the indices of the rows and/or columns that > have been inserted.</p> > */ > const short INSERT = 1; > > /** One or more rows and/or columns have been deleted. > > <p>The affected area of the table is stored in the fields of the > AccessibleTableModelChange structure.</p> > */ > const short DELETE = 2; From the documentation, it would be possible to indicate an insertion or deletion of both, rows and columns in a single event. However, there is no single instance where this is actually used to indicate the deletion/insertion of both, whole rows and whole columns at the same time. The way that indices are currently used is rather confusing and results in incorrect a11y events being sent on maOS as well as the gtk3 VCL plugin: When only rows are inserted, row indices are set as expected (index of the first and last inserted row), but the column indices are set to the first and last column in the table; i.e. the indices actually give the range of the newly inserted cell range, rather than just the indices of the rows that have been inserted. (The same applies the other way around when only columns are inserted.) That's not what I would have expected when reading the documentation. ("Use the fields of the AccessibleTableModelChange structure to determine the indices of the rows and/or columns that have been inserted.") In the same way, the range of deleted cells is set when emitting `AccessibleTableModelChangeType::DELETE` events. In this case, this can be seen as matching what the documentation says. ("The affected area of the table is stored in the fields of the AccessibleTableModelChange structure.") In any case, the way that the events are handled in the gtk3 VCL plugin and for macOS results in the emission of incorrect events, since those are handling such indices as if both, rows and columns had been inserted/deleted. Example for the gtk3 VCL plugin: Row with index 1 has been deleted from a table. -> an AccessibleTableModelChange event is sent with Type=AccessibleTableModelChangeType::DELETE FirstRow=1 LastRow=1 FirstColumn=0 LastColumn=<index of last column> This would then result in 2 AT-SPI events being emitted by the gtk3 VCL plugin: * one that indicates that row 1 has been deleted (OK) * another event that indicates that all columns have been deleted (NOT OK) Instead of changing the handling of the existing `AccessibleTableModelChangeType`s, introduce 4 new types to replace the existing ones that don't mix handling of rows and columns at the same time: one for row insertion, one for column insertion, one for row deletion, one for column deletion. This commit also adds handling for the newly added change types for macOS and the gtk3 VCL plugin on Linux. winaccessibility is unaffected because it doesn't have any handling specific to the change type. The qt5/qt6 VCL plugins don't yet have any handling for the `AcessibleTableModelChange` event yet (but that will be added in a follow-up commit). Existing uses of `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` will be migrated to use the new types in follow-up commits. From a UNO API perspective, this change and the final removal of the `AccessibleTableModelChangeType::DELETE` and `AccessibleTableModelChangeType::INSERT` constants in a follow-up commit should be unproblematic, because the corresponding APIs have been unpublished in commit 70626249cd247d9acdad417b8eaf252bae22c059 Date: Thu Nov 29 00:27:03 2012 +0100 API CHANGE a11y unpublishing and add/removeListener rename. The following Python script was used in follow-up commits to check that AT-SPI events with the expected indices are retrieved with the gtk3 VCL plugin after porting existing uses of `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE`. #!/usr/bin/python3 import pyatspi def listener(e): try: if e.host_application.name != 'soffice': return except: return print(e) pyatspi.Registry.registerEventListener(listener, "object:row-inserted", "object:column-inserted", "object:column-deleted", "object:row-deleted") pyatspi.Registry.start() Change-Id: I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132217 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-10-28XAccessibleSelection: Don't reference non-existing methods in docMichael Weghorn1-3/+2
There are no 'XAccessibleSelection::deselectSelectedChild' and 'XAccessibleSelection::getSelectedChild' methods, so don't mention them in the documentation for 'getSelectedAccessibleChildCount'. First, there's 'XAccessibleSelection::getSelectedAccessibleChild', but not 'XAccessibleSelection::getSelectedChild', so update that accordingly. Second, there's no 'XAccessibleSelection::deselectSelectedChild', and 'XAccessibleSelection::deselectAccessibleChild' doesn't take an index into the selection, but a child index, s. its documentation and the commit message of pending Gerrit change Change-Id: I3c63c647e61baaa6288ffd545d8d89d8b94231de ("gtk3 a11y: Use correct index when deselecting child") on how the semantics of AT-SPI functions with corresponding names differ. (The comment was added in commit daacf7ed0bc8a1a2447c4b1cb340c97f82918af8 Date: Thu Apr 24 16:35:46 2003 +0000 INTEGRATION: CWS uaa02 (1.1.2); FILE ADDED 2003/04/02 10:06:50 obr 1.1.2.3: #108113# Renamed deselectSelectedAccessibleChild to deselectAccessibleChild 2003/03/14 10:40:52 af 1.1.2.2: #108113# Removed references to the drafts directory. 2003/03/11 15:00:39 af 1.1.2.1: #108113# Moved from drafts/com/sun/star/accessibility. and > 2003/04/02 10:06:50 obr 1.1.2.3: #108113# Renamed deselectSelectedAccessibleChild to deselectAccessibleChild sounds like there might temporarily have existed a draft implementation that actually took an index into the selection rather than a child index.) Change-Id: Ib8eeadd1ffe8e05b87422e3f9d5c4b3fcc6b696d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124332 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-28XAccessibleValue::getMinimumIncrement: Add "@since" annotationMichael Weghorn1-0/+2
Add "@since LibreOffice 7.3" annotation for the method added in commit b5ada12ffd0b6b8677430fce117c4c1e38cc9159 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Jul 28 11:26:16 2021 +0200 a11y: Add XAccessibleValue::getMinimumIncrement method Thanks to Stephan for pointing it out in above commit's Gerrit change. [1] [1] https://gerrit.libreoffice.org/c/core/+/119596 Change-Id: I416653ea5ebf3a09effead2d132db340d08e6c53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119634 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-28Minor fix in comment for XAccessibleValue::getMinimumValueMichael Weghorn1-1/+1
This looks like a copy-paste error. The *upper* bound is relevant for 'getMaximumValue', the *lower* bound for 'getMinimumValue'. Change-Id: Ibe707fde6185c0fa757741683f046393e2003eb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119600 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-28a11y: Add XAccessibleValue::getMinimumIncrement methodMichael Weghorn1-0/+14
Add a method 'getMinimumIncrement' to the XAccessibleValue interface. The method returns the minimal increment by which the value represented by the object can be adjusted. The main motivation is to expose this to AT-SPI, so it can be retrieved e.g. by libatspi's 'atspi_value_get_minimum_increment' function [1], s. the note in Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 "a11y: Expose FormattedField as spinbox" for more details. The implementation relevant for the 'FormattedField' class is in 'SVTXAccessibleNumericField::getMinimumIncrement', which returns the spin size. While at it, also move the comment in sw/source/core/access/acccell.hxx mentioning what methods are overriden for the 'XAccessibleValue' interface to the right place. [1] https://developer.gnome.org/libatspi/stable/libatspi-atspi-value.html#atspi-value-get-minimum-increment Change-Id: Ie148a4e1cedbdbb5964f8565c81611d3480465cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119596 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-05-28[API CHANGE] drop unpublished XAccessibleGetAccFlowToCaolán McNamara1-38/+0
Change-Id: I7e67677396bd50d59b519e6acf2b3c75d3c12ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-28Resolves: tdf#133411 drop CONTENT_FLOWS_TO from dialog to search resultsCaolán McNamara1-1/+0
in the document, looks like only the calc one actually works, and when it works on large quantities of results calc grinds to a complete halt This was introduced with: commit b41332475783c31136673fb44cf4c411bb0148f8 Date: Mon Dec 2 15:54:29 2013 +0000 Integrate branch of IAccessible2 and has been a problem on and off with calc's potentially ~infinite grid There is the on-by-default search results dialog in calc (which has a limit on how many it shows) which provides an alternative route to iterate through the results Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-07tdf#118418 implement scrollSubstringTo() for gtkColomban Wendling2-0/+108
Define & use new accessibility scroll type compatible with IAccessible2 and extend the XAccessibleText interface to require scrollSubstringTo(). Co-authored-by: Martin Pieuchot <mpi@grenadille.net> Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I50a80014addf5fb6a3974139249f45f6a2e67d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92939 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-11-27tdf#108642 load accessibility children fasterNoel Grandin1-0/+45
Reduces the cost of repeatedly iterating over the page objects, by adding a new XAccessibleContext3 interface to return accesibility children in one call. This takes the load time from 5.6s to 3.2s. Change-Id: Ifcc20fa7e7ab8ad50417073882c8c3a2405d1eaa Reviewed-on: https://gerrit.libreoffice.org/83850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-18convert AccessibilityFlowTo to scoped enumNoel Grandin1-0/+1
and drop the unused FORSPELLCHECKFLOWTO Change-Id: I128e84d386c10d001aa63f93b4b6dcb7238a1242 Reviewed-on: https://gerrit.libreoffice.org/83060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-10Fix typosAndrea Gelmini1-1/+1
Change-Id: I49ac790b4f1b09f5041ec95b8cdf0d6323d036d9 Reviewed-on: https://gerrit.libreoffice.org/78796 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-07-23Fix typosAndrea Gelmini5-8/+8
It passed "make check" Change-Id: I055017a7616ed4d9725c66a387c040b55e22751f Reviewed-on: https://gerrit.libreoffice.org/76202 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-05-09tdf#124400 a11y: add accessible IDSamuel Thibault1-0/+56
Such ID is not meant to be presented to the user, but to be an ID which is stable over application development. Typically, this is the gtkbuilder ID. Such an ID can then be used to identify a given well-known accessible object independently from the current locale, user-visible labelling, or dialog structure. This can then be used for tailored screen reading (e.g. automatically announcing the content of a well-known object), or for automatic regression testing (to check the behavior of well-known objects). Uniqueness within the window is thus desirable when returning a non-empty string. This adds XAccessibleXContext2 to augment XAccessibleXContext with getAccessibleId(). The VCL implementation just takes Window::get_id(), i.e. the gtkbuilder id, which is enough for most use cases for now. atk_object_wrapper_new then passes it to atk_object_set_accessible_id() for AT-SPI technologies to pick it up. Change-Id: Iea0ad08d036e539dbcfec1a9be026c8da8d17357 Reviewed-on: https://gerrit.libreoffice.org/71743 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2018-10-30XAccessibleText: Add reference to CharacterPropertiesSamuel Mehrbrodt1-0/+2
Change-Id: I367e0a38ca44b6577e79c1cf2c447a85582ce1e3 Reviewed-on: https://gerrit.libreoffice.org/62632 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-05Remove references to java classesSamuel Mehrbrodt1-2/+1
Change-Id: I040d6b597d7f947b6ee19cefc19b21cf7a55fa71 Reviewed-on: https://gerrit.libreoffice.org/61425 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-08-14tdf#116542 a11y: introduce STATIC roleSamuel Thibault1-2/+14
This should be used for brief non-editable text which is not meant to have a relation with another object (as opposed to text or label). Change-Id: I46bfa56042a51295e9fa0d332babdbb40668ff0b Reviewed-on: https://gerrit.libreoffice.org/58734 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-19fix typo/grammar: "the the" --> thedennisroczek1-8/+7
* also removing pointless ASCII art (tdf#62475) * truncate ending whitespace in Doxyfile Change-Id: I59b012f41ac0d170216229da85a49aa41689dee5 Reviewed-on: https://gerrit.libreoffice.org/35151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-12Fix typosAndrea Gelmini1-1/+1
Change-Id: I63da858b3f264cd099e60192633b44d362b6fad7 Reviewed-on: https://gerrit.libreoffice.org/35055 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-04-30Fix typosAndrea Gelmini2-2/+2
Change-Id: Id81b16ff26283611f0b84929d831c827f847ab73 Reviewed-on: https://gerrit.libreoffice.org/24317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-02-01coverity#1267693 Uncaught exceptionCaolán McNamara1-1/+2
Change-Id: Id6ed00e9c23cf0cd48ead203e772450680687762
2015-01-23Document some accessible events in AccessibleEventId.idlNiklas Johansson1-6/+58
Add some documentation to a few undocumented functions. I'm a bit unsure of ACTIVE_DECENDANT_CHANGED_NOFOCUS but to me it seems to be a work around for windows that maps ACTIVE_DECENDANT_CHANGED to event object focus. See the note for IA2_EVENT_ACTIVE_DESCENDANT_CHANGED in the IA2 documentation: http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_accessible_event_i_d_8idl.html#ae26846b6d521727ab696d20c3f43c0b5ac1379bc85d7afda57be018a7a44dc918 Change-Id: I99afc804731ad62e95c013682dc605abfc382646 Reviewed-on: https://gerrit.libreoffice.org/14137 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-20Add documentation for AccessibleStates STALE, OFFSCREEN and COLLAPSENiklas Johansson1-1/+8
Change-Id: I6bfcd180f0c1d9e63577f58685ce64c509d91326 Reviewed-on: https://gerrit.libreoffice.org/14055 Tested-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini1-3/+3
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>