janeway icon indicating copy to clipboard operation
janeway copied to clipboard

Add italics support in Keywords

Open pgoussy opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. An author has requested that one of their keywords be set in italics (it's a Japanese word transliterated into Roman text). I just tried to do this the same way we do italics in article titles, but evidently if you put <i> tags in a keyword, the tags are not rendered, but instead are displayed visually on the HTML galley.

Describe the solution you'd like It's not likely to come up often, but it would be nice if <i> tags within individual keywords could be used to render italic text on the HTML galley.

Additional context I have removed the failed italic keyword so that it no longer displays on the article, but please see screenshots below for an illustration.

2023-04-17_16-50-07

2023-04-17_16-50-26

pgoussy avatar Apr 17 '23 20:04 pgoussy

Still not a high priority by any means, but I wanted to note that we just encountered another article with a few foreign-language keywords that were intended to be displayed in italics

pgoussy avatar Feb 27 '24 19:02 pgoussy

We've discussed this a bit and are tentatively in favor of allowing italics in keywords. A related consideration is how to mark keywords with a separate language than the surrounding content, which we need to do for accessibility. We also need to consider downstream metadata standards that do not allow HTML in the keyword field.

So we are considering:

  • Make the keyword a rich-text field (JanewayBleachCharField)
  • Allow the user to select the language and apply italics through the TinyMCE widget toolbar
  • Create a function for relevant metadata streams that strips tags
  • Make sure to consider usability of selecting different language variants like for transliteration

joemull avatar Jun 06 '24 10:06 joemull