Bug 138504 - Support viewing and setting "Decorative" flag on objects marked as such in MS Word
Summary: Support viewing and setting "Decorative" flag on objects marked as such in MS...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All All
: medium enhancement
Assignee: Michael Stahl (allotropia)
URL: https://issues.oasis-open.org/browse/...
Whiteboard: target:24.2.0 target:7.6.0.0.beta2
Keywords: accessibility
: 147738 (view as bug list)
Depends on:
Blocks: a11y, Accessibility Unify-Across-Apps
  Show dependency treegraph
 
Reported: 2020-11-26 08:41 UTC by juergenkohler23
Modified: 2023-08-10 08:45 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
A collection of different objects supported by Word 2019 (92.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-12-12 17:13 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the Frame in Word 2019 and Writer (168.39 KB, image/png)
2022-12-12 17:13 UTC, Gabor Kelemen (allotropia)
Details
The grouped shape in Word and Writer (151.04 KB, image/png)
2022-12-12 17:15 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description juergenkohler23 2020-11-26 08:41:15 UTC
Description:
In Word you can mark pictures etc. as a decorative element/artefact; in LibreOffice it seems not to be possible.
It would be good if this function could be implemented. It would be useful for creating accessible documents, because by marking graphics as a decorative element one can tell screen readers used by blind and visually impaired people that they can skip certain images or graphics.

Actual Results:
It is not possible in LibreOffice to mark pictures as decorative elements.

Expected Results:
It is possible in LibreOffice to mark pictures as decorative elements.


Reproducible: Always


User Profile Reset: No



Additional Info:
-
Comment 1 Peter Franke 2020-11-26 11:24:59 UTC
This would indeed be a helpful and desirable innovation.
Comment 2 juergenkohler23 2021-05-31 08:31:29 UTC
Unfortunately, there still does not seem to be such a function in LO.
Comment 3 Christophe Strobbe 2022-05-19 15:08:20 UTC
*** Bug 147738 has been marked as a duplicate of this bug. ***
Comment 4 Christophe Strobbe 2022-05-19 15:14:16 UTC
Note that marking an image or other non-text object as decorative requires a new attribute in the ODF specification; ODF currently does not have a feature that allows authors to mark objects as decorative.

I have submitted a feature request for this to the OASIS ODF committee. I reproduce the entire text of my request below, because it contains important information for implementers:


This is a request to add an attribute to ODF that marks an image or other type of (non-text) object as decorative or presentational. A decorative or presentational object would not have a text alternative (for example, neither <svg:title> nor <svg:desc> in a <draw:frame> with presentation:class="graphic").

Details:
1. Such an object would not be mapped to the accessibility API when the document is viewed in a read mode, such as the Slide Show mode in LibreOffice Impress or the Read Mode in Microsoft Word. (LibreOffice Writer doesn't have anything like a Read Mode.) However, the presence of decorative object should still be exposed to the accessibility API in all editing modes, since screen reader users need to be made aware of its presence when editing a document.
2. When an object is marked as decorative, editors should disable fields that allow authors to edit text alternatives (so <svg:title> and <svg:desc> are not output at all).
3. When an image or object has a caption, editors should not allow it to be marked as decorative. (The presence of a caption signals that the object conveys meaning.)
4. The new attribute seems relevant to <draw:frame> elements with a presentation:class attribute with the value 'graphic' or 'object', and to <draw:custom-shape>. However, whether an object or shape is decorative or not depends on the author's intent. I am not aware of a mechanism to determine this automatically.
5. When a document containing a decorative object is exported as tagged PDF, the object should also be marked as decorative in the PDF file. (In Adobe Acrobat DC, the checkbox "Decorative figure" in the "Set Altenate Text" would be checked and the "Alternate text" field would be grayed out.)
6. When a document containing a decorative object is exported as HTML or XHTML, the alt attribute on the img element would simply be empty. (This is HTML's convention for signalling that the img element is decorative). If the object is output using an element other than img, the ARIA attribute role="presentation" would be added to the element (see also https://www.w3.org/TR/wai-aria-1.1/#presentation ). (This is relevant to Appendix D.1.)

Note that Microsoft Office introduced the ability to mark images and other objects in Word documents and PowerPoint presentations in version 2019 of the office suite. (Support in assistive technologies seems to be lagging.) The above request would eventually enable something similar in LibreOffice and Apache OpenOffice.
Comment 5 Regina Henschel 2022-07-11 15:44:20 UTC
The ODF TC has generated an issue to extend the standard so that such information can be stored in the file. The next step would be, that someone implements it and cooperates with the ODF TC about in which way the information should be standardized.
Comment 6 Gabor Kelemen (allotropia) 2022-12-12 17:13:10 UTC
Created attachment 184116 [details]
A collection of different objects supported by Word 2019

After the attribute was initially added in bug 143311 a few more things became obvious:
- This was added to Writer images (so it's missing in Calc, Impress, Draw), which under the hood utilize the Frame object.
- Other Word objects also have this attribute: Drawing shape (including grouped ones), WordArt (which is a fancy-formatted drawing shape), Chart, SmartArt. 
Of these only the Chart is Frame-based in Writer, so this has the attribute, the rest does not. 
Probably would make sense to extend those objects with this attribute as well, also for the case of Calc, Impress, Draw objects and images in those apps.

- Some Word objects don't have this attribute: equation, OLE-object, frame. Yet these are Frame-based in Writer, so they do have the attribute.
This does not necessarily causes disasters on PDF export or OOXML-interop, just noticing.
Comment 7 Gabor Kelemen (allotropia) 2022-12-12 17:13:52 UTC
Created attachment 184117 [details]
Screenshot of the Frame in Word 2019 and Writer
Comment 8 Gabor Kelemen (allotropia) 2022-12-12 17:15:56 UTC
Created attachment 184118 [details]
The grouped shape in Word and Writer
Comment 9 Regina Henschel 2022-12-12 18:13:51 UTC
We have just discussed this in the ODF TC meeting. Michael will write a proposal, where more elements are considered for such tag. Perhaps you get in contact with Michael?

The related issue at OASIS is https://issues.oasis-open.org/browse/OFFICE-4132.
Comment 10 Stéphane Guillou (stragu) 2023-04-21 14:01:33 UTC
Following the fix for bug 143311, and given Gabor's Comment 6 and attachment 184116 [details], I am widening the scope of this report to allow marking more than images as decorative, but keeping the focus on Writer.
Other reports can be opened about other components if needed, like the existing bug 141058.
Comment 11 Commit Notification 2023-07-05 17:54:45 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6efc72b99a08384e56c5a4da7918177be60b3b09

tdf#138504 svx,etc.: decorative flag on SdrObject shapes

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2023-07-05 22:16:21 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/9c3475e1dc42b6992af58aeb585ebe58afbf8ea9

tdf#138504 svx,etc.: decorative flag on SdrObject shapes

It will be available in 7.6.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2023-07-06 08:37:23 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/d749df06bd33ae91361b49e456e44b9c8ba859d9

tdf#138504 helpcontent for decorative on shapes
Comment 14 Commit Notification 2023-07-06 08:38:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/help/commit/6f541fe621dafb755cb73a68219ea031b31b4f64

tdf#138504 helpcontent for decorative on shapes
Comment 15 Michael Stahl (allotropia) 2023-07-07 09:53:30 UTC
Decorative flag is supported by SdrObject in Writer/Impress/Draw/Calc now.