"Format/Set highlight color" glitch(es) with formatted note

I have a formatted note. Select a piece of text and change the highlight color in the Format menu. Note that I do not actually select the “highlight” entry from that menu!

Nevertheless, the piece of text gets highlighted in the selected color.

2nd issue: I select and highlight text in one color. Then, I select another highlight color and highlight another piece of text. Now selecting the first one again, it does not appear as “highlighted” in the “Format” menu, i.e. there’s no check mark behind the menu entry “Highlight”.

Apparently, DT includes the highlighted text in a span element with a style attribute setting the background color.(<span style="background-color...">). While that technically works, it is (I believe) semantically wrong. Instead, the mark element should be used for highlighting. This should also make it possible for DT to easily recognize highlighted text as such for all possible colors. And a screen reader could pick up on the mark, while it can’t on the span.

The initial behavior has been the case for quite some time. Selecting an item in Format > Highlight Color will apply the selected color. The Format > Highlight command allows you to quickly apply the active highlight colors to selected text.

I’m not seeing the second issue here. What OS are you running?

macOS 13.1
But let’s talk about that later – we’re celebrating tonight :christmas_tree:

1 Like

Here: DT 3.8.7 on Ventura 3.1, Intel-Mac

The second issue being “a highlight with a color different from the current highlight color is not marked as such in the Format menu”.
Please see below for screenshot.

  • I first highlight “would” in yellow. Then I highlight “CSS” in red.
  • Then, I deselect and reselect “CSS” – the entry “Highlight” is checked in the “Format” menu.
  • Finally, I select “would” again – the entry “Highlight” is not checked in the “Format” menu.

Ahh, so the Editing bar button isn’t responding. Gotcha.

@cgrunenberg will have to look at that next year :wink:

A copy of the document would be useful as this might be related to its CSS.

Sent by e-mail

Thank you! Both the Highlight editing bar item and the Format > Highlight menu item only get checked if the text selection is completely highlighted with the selected highlight color (see Format > Highlight Color menu).

Exactly. I’d suggest using mark instead of span for highlights in formatted notes, because that’s the appropriate element, semantically. Also, it would be simpler to identify by assistive technology.

We already tested this internally but due to issues caused by the used WebKit framework it’s currently the way it is.