From: toastal <to...@us...> - 2024-10-01 07:21:12
|
I would say the title is strictly for HTML output. In the way that touch pointers often can’t read the `title`, it is left for cursor pointer & screen readers. Thinking about it in this sense tho, I think even if the HTML attribute is called `title` the name is probably easily confused with something visible. HTML spec says to not ‘rely’ on it, but it makes a good place for Easter eggs or other flavor commentary. For context, my existing workaround is, as you noted, using a `.. figure` & post-processing based on a specific CSS class to 1) move `<figcaption>` contents to `title`, 2) ‘unwrap’ the parent `figure` node to just leave the `<img>` behind, but this feels like a hack/abuse, especially since the flavor text isn’t meant to be visible for PDFs which the `.. figure` would show. More info: https://html.spec.whatwg.org/multipage/dom.html#the-title-attribute --- **[feature-requests:#108] Image title directive option** **Status:** open **Group:** Default **Created:** Sun Sep 29, 2024 08:41 AM UTC by toastal **Last Updated:** Tue Oct 01, 2024 07:00 AM UTC **Owner:** nobody Like `image`’s `:alt:` directive, allow `:title:` for creating titles on pointer hover. The use case here is different from alt as alt is for assistive technologies & titles are more to give a labels for images for those with pointer cursors. Expected input ~~~ .. image:: /house.jxl :alt: Home :title: Navigate home :target: / .. image:: /cat.jxl :alt: A Siamese cat on a chair :title: Chula says, “meow” ~~~ Expected HTML output ~~~ <a href="/"><img src="/house.jxl" alt="Home" title="Navigate home"></a> <img src="/cat.jxl" alt="A Siamese cat on a chair" title="Chula says, “meow”"> ~~~ ~~~ --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |