Adding metadata to the output

From What is image metadata? - Definition from WhatIs.com, there are 3 types of metadata:

  • Technical metadata: aperture, shutter speed, ISO number, focal depth, dots per inch, etc
  • Descriptive metadata: name of the image creator, keywords related to the image, captions, titles and comments, etc
  • Administrative metadata: usage and licensing rights, restrictions on reuse, contact information for the owner of the image,etc

Is it possible to automatically add the administrative and specifically the descriptive metadata to the output? Although there are other tools specialized for this, it would be neat if the content be translated to regular language automatically (e.g. from a [label="Alice"]-> b [label="Bob"] to node Alice points to node Bob). Just a simple command from the user perhaps metadata=true`, but it will open access to the whole visually impaired community.

I think this is a very worthwhile feature-to-be. (i.e not ready for implementation, but definitely worth investigation.)
The basic idea: give Graphviz the ability to produce descriptive metadata that would help visually impaired folks understand (to some degree) Graphviz output. (I hope this is an accurate restatement of Ooker’s idea).

The good news:

  • this can probably be prototyped without touching Graphviz itself.
  • jpeg & png metadata can be added/changed after the image is created (e.g. https://exiftool.org/)
  • the Graphviz language already has a comment attribute for all objects
  • postprocessors (python, gvpr, etc.) could easily produce node Alice points to node Bob or the Depression follows World War I (Bob follows Alice seems creepy! Alice points to Bob sounds like the beginning of a short story)
  • the same basic text could be used for HTML “alt text” (alt attribute - Wikipedia) or longdesc (HTML element - Wikipedia)

The hard part:

  • What should the metadata contain?
  • What should it not contain?
  • Are there standards for “descriptive metadata”?
1 Like

I think we should do more for accessibility of generated graphs and this is a good place to start. We could add an attribute like “alt” or “desc” that outputs a description tag for SVG output.

Let’s start with letting the end user specify the alt text, and then we could look at auto-generating it after that (I guess auto-generating will be much harder).

1 Like

FYI I have filed an issue on Graphviz to start a discussion around this: Improve Graphviz output accessibility for screen readers. (#2220) · Issues · graphviz / graphviz · GitLab

Let’s continue design discussion there.

I wonder what is the difference between discussing in here and in there?

  1. The issue I’ve filed is a little more tighty scoped than this forum thread, about a specific new accessibility feature (rather than general metadata).
  2. Filing an issue on GitLab lets me link up any code changes with the issue.

You’re welcome to keep discussing the general metadata question here. It’s just easier if there’s discussion about one issue to centralise it in one place.

1 Like