Bug 157003 - Write more accessibility unit tests
Summary: Write more accessibility unit tests
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility, difficultyMedium, easyHack, skillCpp
Depends on:
Blocks: a11y, Accessibility
  Show dependency treegraph
 
Reported: 2023-08-30 08:44 UTC by Michael Weghorn
Modified: 2023-08-31 06:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2023-08-30 08:44:06 UTC
LibreOffice has a framework to write C++ unit tests to test accessibility, introduced by Colomban Wendling (Hypra) in the context of a TDF tender. [1]

In order to prevent future regressions (and find already existing bugs along the way), it would be great to have more tests, i.e. a larger test coverage.

This bug/enhancement report is about writing more tests.

Extensive documentation about writing C++ tests with a description of what kind of tests are possible and some ideas where to start is available on this wiki page:
https://wiki.documentfoundation.org/Development/Accessibility_Unit_Tests

[1] https://blog.documentfoundation.org/blog/2021/10/13/tender-to-implement-c-accessibility-tests-202110-01/
Comment 1 Michael Weghorn 2023-08-31 06:16:11 UTC
(In reply to Michael Weghorn from comment #0)
> Extensive documentation about writing C++ tests with a description of what
> kind of tests are possible and some ideas where to start is available on
> this wiki page:
> https://wiki.documentfoundation.org/Development/Accessibility_Unit_Tests

As described in more detail on that wiki page, there are different approaches to improve/extend a11y tests, e.g.:

1) convert existing Java a11y tests to C++
2) write new tests using the LibreOffice-internal API
3) write new tests to test the platform-specific integration

1) and 2) can be done on all platforms (but tests for 2) that involve dialogs currently don't work on macOS), 3) is currently only implemented for the gtk3 VCL plugin on Linux. (Implementing this for other platforms/VCL plugins is possible, too, but probably more complex than adding more tests. Some more details in Colomban's email: [1])

The wiki page also contains pointers to existing tests/previous commits that give an impression on how to implement tests.

[1] https://lists.freedesktop.org/archives/libreoffice/2023-August/090720.html