Bug 68219 - Accessibility does not report text attributes from parent style(s)
Summary: Accessibility does not report text attributes from parent style(s)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Boris Dušek
URL:
Whiteboard: target:4.2.0 target:4.1.2
Keywords:
Depends on:
Blocks: a11y, Accessibility
  Show dependency treegraph
 
Reported: 2013-08-17 14:35 UTC by Boris Dušek
Modified: 2016-10-25 19:42 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Testing document for reproducing the bug (15.89 KB, application/vnd.oasis.opendocument.text)
2013-08-17 14:35 UTC, Boris Dušek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Dušek 2013-08-17 14:35:17 UTC
Created attachment 84174 [details]
Testing document for reproducing the bug

When using VoiceOver/Orca to speak text attributes, then attributes from the parent style of current style have no effect.

Steps to reproduce:
1. Open the attached document, AXParentStyleAttributes.odt
2. Launch VoiceOver or Orca, let them read text attributes on each line of text (VoiceOver - VO+T, Orca - Orca+F)

Actual results:
First and third paragraphs are reported correctly - first paragraph is reported as fontname "Arial", third paragraph as being "italic".
Second and fourth paragraphs are reported wrongly in some attributes - second paragraph is reported as having font "Times New Roman", fourth paragraph is not reported as "italic"

Expected results:
Second paragraph is reported as having font "Arial" (the same as the first paragraph).
Fourth paragraph is reported as being "italic" (same as the third paragraph).

Regression:
Issue reproduced with VoiceOver on OS X 10.8.4 and LibreOffice 4.2 master (3a34474db59067073d8c8f91b0173cab3a60850e).
Issue reproduced with Orca (package version 3.8.0-0ubuntu1) on Ubuntu Linux 13.04 32-bit (default installation from CD with no upgrades) and LibreOffice (package version 4.0.2-0ubuntu1)
I did not attempt to reproduce the issue on Windows at all.

Notes:
If one changes the "Default" font in LibreOffice Preferences/Options > LibreOffice Writer > Basic Fonts (Western), then this font is reported instead on paragraph 1 of this example.


If one changes the style of paragraph with the "Heading 1" style into style "Heading", one gets the correct result of having "Arial" reported as font. So the issue seems to only affect style attributes that do not originate from the paragraph style itself, but from its parent paragraph styles (and its parents recursively).

I have a fix in the works which I will submit for review. In short, SfxItemSet with the paragraph style attributes should be used in such a way so that attributes from its parent sets are recursively used.

Thanks to Niklas Johansson for testing this issue and his useful observations (e.g. the default font).
Comment 1 Commit Notification 2013-08-19 16:05:18 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cc0dd9f8bd4ee52e5a26c0630e7960386aeffb15

fdo#68219: Parent style text attributes missing in accessibility



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 2 Niklas Johansson 2013-08-19 18:58:11 UTC
I checked out Boris patch from gerrit and built it on Mac OS X 10.8, it seems to fix the issue with wrong font-name being reported.

I did the same on Ubuntu (gnome desktop) and it seems to fix the problem there as well.

Will have to wait for daily build to check it on Windows but I'm confident that the issue is resolved there as well.

I'll mark this bug as resolved (worksforme).
Comment 3 Boris Dušek 2013-08-19 19:00:22 UTC
Thanks Niklas very much for testing, especially by building on Ubuntu (I would not want to compile LibreOffice in a virtual machine :-)
Comment 4 Niklas Johansson 2013-08-20 11:12:26 UTC
Interesting, I checked the bug on Windows to verify it's existence. And it seems someone has probably noticed this in the past and just tried to differentiate between Proportional and Monospaced fonts. 

How ever I can verify the bug by adding a new style based on Preformatted, which is monospaced and see that the new style reports proportional (default style).

I will not dig more here now since I'm confident your fix will apply to Windows as well. I will file a new bug regarding the accessibility bridge on Windows that reports:
Font family:  Proportional

instead of
Font family:  Arial

or whatever the font name is.
Comment 5 Commit Notification 2013-08-20 13:47:02 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e5c7249382c12349e4e032c225c0153f6f41cccc&h=libreoffice-4-1

fdo#68219: Parent style text attributes missing in accessibility


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.