How to use rules with labels

I currently have a form with long questions which don’t render well when used as a label for a control. As such I want to make a separate label for each question. However I want to use the same rules as the actual question but the rules don’t seem to work on the label types. Is there any way to achieve what I want? (Using the angular seed repo as a base). An example of the problem is shown below -

[
  {
    "type": "Label",
    "text": "Really long question which is to long to render correctly as a question using the label field within a Control type",
    "rule": {
      "effect": "SHOW",
      "condition": {
        "schema": {
          "const": true
        },
        "scope": "#/properties/policy/properties/someQuestion"
      }
    }
  },
  {
    "type": "Control",
    "scope": "#/properties/policy/properties/differentQuestion",
    "label": "",
    "rule": {
      "effect": "SHOW",
      "condition": {
        "schema": {
          "const": true
        },
        "scope": "#/properties/policy/properties/someQuestion"
      }
    }
  }
]

Hi @joefredgreenwood, thanks for your interest in JSON Forms. You’re right, the label renderer in Angular Material ignores the visibility indicator.

To fix this in your code base you can register a custom label renderer (which could even reuse the existing label renderer), but also respects the visibility. Feel free to open an issue against JSON Forms and, if you have time, contribute a fix :wink:

Ah okay that makes sense! As a workaround I’ll just combine the questions / answers in to a group and set rules at a group level. As a slight follow up question, as far as I can tell the labels are html. Does that allow you to use html syntax such as defining hyperlinks within the label so I can include external resources in the form?