Semantic styles broken in Writer? Headings missing in PDF and accessibility checker

Hello.

I’ve always been using semantic styles to mark up my headings in documents.

In two documents I’m working on currently, it seems that Writer doesn’t know any semantics behind the heading styles I applied.

All I did was change the font and colour of the already existing Heading style. I applied Heading 1 and Heading 2.

When checking accessibility, it’s complaining that I was applying formatting to convey semantics for the headings. When I export a PDF, there is no outline available.

Did something break? Did I miss something?

Version: 25.2.3.2 (X86_64)
Build ID: 520(Build:2)
CPU threads: 4; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Thanks!

Attach a sample file to check style configuration.

Hei ajlittoz.
Thanks for looking into this.

So I took the file, deleted all contents, pasted new, unformatted content, and applied Heading styles to some headings.

The result: Only the Heading level 3 seems to be recognised as such.

Accessibility checker does not complain about formatting being used for semantics this time, but that headings should start at level 1, not 3, hinting that only level 3 is recognised.

When exporting the file to PDF, the only heading in the index is the Heading 3.

Download the test file

I think I found the reason. In the style settings for the Headings, in “Structure and lists” (I guess, freely translated from German) there is no level assigned.

When I create a new document, Headings are assigned the respective level 1–3 there.

You changed built-in configuration in Tools>Heading Numbering. You removed level 1, 2 and 4 from outline by assigning no ([None]) paragraph style to these levels. This has automatically caused Outline & List settings to be configured for [None] level.

I see that list style is set to WWNum1 which is a sign that your document originally was created in M$ Word. This is confirmed by a Converted1 page style.

If you want reliable and predictable layout and formatting, avoid manipulating converted DOCX documents. Prefer to create fresh document and paste text as unformatted so that Word idiosyncrasies are not imported in Writer.

You also have many Default Paragraph Style paragraphs in your banner. This is also a follow-on from Word where this paragraph style is the default one for text whil it is Body Text in Writer.

Your document is plagued wit direct formatting. If this is a one-shot throw-away document, it does not matter. However if you contemplate updating it on a medium- or long-term basis, you should consider styling it without direct-formatting.

Also avoid using frames without necessity. Your frames could as well have been replaced by tables (e.g. your frame in the banner contains a table; you could have design a global table for the frame). In this specific case (2-page document), it does not really matter but in a larger and more sophisticated document, this could make a lot of difference.

You added a drawing object to create a coloured background for your banner. Avoid this. Drawing objects are not intended to cooperate with text (they are rather decorations to be put aside text, not above or below it). Your background rectangle present a design flaw: you want it valid for a collection of paragraphs while the “connection” (i.e. the anchor) designates a single paragraph. Once again, this is not a problem in this simple document, but in a more complex one, if you expect automatic behaviour after edits, this won’t work. You should play with paragraph background (Area tab of paragraph style) on a consistent set of paragraph styles.

1 Like

Hello again!

Thank you so much for the extensive feedback, it’s much appreciated!
The key issue must be the Tools > Heading Numbering setting.

I realised in your comments that I unintentionally uploaded the wrong document, I intended to upload one with only headings and paragraphs.

But that allowed for more complete feedback, thanks again.
I’ll restart the document. It changed over many years, and I don’t recall starting in Word, but I needed to send it in Word once, maybe there was a mixup.