Should labels be masked by default or always?

I do not think label masking should be the default behavior. While masking can improve readability in some situations, it also introduces visual artifacts and can obscure important graph elements. More importantly, I think it addresses a symptom rather than the underlying issue.

One alternative approach is to reduce the visual prominence of the graph’s supporting elements, particularly gridlines and axes. In my own use of Doenet JSXGraph components, I found that the default grid styling often competed directly with labels for attention. By reducing the intensity and contrast of the grid and axis elements in both light and dark modes, labels become much easier to identify without requiring any masking.

This approach gives greater visual weight to the labels while still preserving the visibility of the graph itself. Even on relatively dense grids, labels remain legible because the background elements are no longer competing for attention. In contrast, with the current default Doenet styling, labels can become difficult to distinguish. For example, the b label denoting the region of integration can be nearly indecipherable because it intersects into the gridline with the same color-profile.

From an accessibility and design perspective, reducing nonessential visual contrast is often preferable to covering content behind a label. It preserves the integrity of the graph, avoids masking artifacts, and improves overall visual hierarchy. Labels should naturally stand out from their surroundings rather than requiring a background patch to remain readable.

Unfortunately, this is not currently an option available to most authors. I am only able to make these adjustments because I embed Doenet within external resources and generate the iFrames myself, which allows me to inject custom styling. If authors had more control over the appearance of grids, axes, and other background elements, the need for label masking would likely be reduced significantly. For that reason, I would prefer that masking remain an optional setting rather than becoming the default behavior, and options to control relative visual weights being exposed to content authors be explored.