Page MenuHomePhabricator

WDQS graph does not show ids when labels are used
Open, Needs TriagePublic

Description

Steps to reproduce:

  1. Open query https://w.wiki/Mq3
  2. Change to graph view (bottom of left toolbar)
  3. Hover over any node

https://github.com/wikimedia/wikidata-query-gui/blob/master/wikibase/queryService/ui/resultBrowser/GraphResultBrowser.js#L181

When no label is supplied, graph nodes are labelled with the id (e.g. "Q42"), but this can be overridden with an appropriately-named variable in the SPARQL query. In both cases, the hoverover always shows the same text as the label.

Suggested solutions:

  1. Make the "title" field always be the node id
  2. (If there is some accessibility reason to preserve the label in the hoverover text) When the label is supplied, make the title be a concatenation of the node id and the label (e.g. "Q42: Douglas Adams")