- Issue created by @swirt
- ๐บ๐ธUnited States kurttrowbridge
I've been poking at this a little bit tonight, and I think it's an issue specific to the way the Claro theme (and probably others based on it, like Gin) handles focus indicatorsโthe typical green outline visible when focusing on an element in Claro is actually a
box-shadow
, and theoutline
is transparent (I think because of something having to do with Windows High Contrast Mode). I'm not positive why thebox-shadow
doesn't show up, but assume it has something to do with the<a>
element being within an<svg>
element.If I switch to another admin theme (I switched to Umami; it's meant to be a front-end theme, but still illustrated what I needed), I do see focus indicators when tabbing through the diagram elements.
Anyway, a possible solution could be to target
.mermaid svg a:focus
and apply anoutline-color
there. I wonder if that might be more suitable in the Mermaid Diagram Field module, so feel free to move this there if you'd like and I can provide a new MR, but I'll include one that adds theoutline-color
with a value ofvar(--color-focus)
for themes like Claro that provide that CSS variable, and a fallback tocurrentColor
for those that don't. - Merge request !13Added outline color to make focus indicator visible on anchors within Mermaid diagrams โ (Closed) created by kurttrowbridge
- Status changed to Needs review
9 months ago 5:11am 28 February 2024 - ๐บ๐ธUnited States swirt Florida
This is awesome @KurtTrowbridge thank you so much for working on it. I think you are right, this issue was created before I broke out the Mermaid handling into its own module. I will try to move this issue there. If I can't, I will just apply your change to that module, no need for you to create an additional PR.
I should be able to make this happen today. Cheers.
- ๐บ๐ธUnited States swirt Florida
Crediting @flanneryla for raising this issue and @KurtTrowbridge for fixing it.
- Status changed to Fixed
9 months ago 3:20pm 28 February 2024 - ๐บ๐ธUnited States swirt Florida
Closing this as fixed.
I added a setting of the outline size because on larger diagrams the outline is barely visible.
This will go out with 1.0.2Thanks again @KurtTrowbridge and @flannerla
- Status changed to Fixed
9 months ago 3:26pm 28 February 2024 - ๐บ๐ธUnited States swirt Florida
Released as part of https://www.drupal.org/project/mermaid_diagram_field/releases/1.0.2 โ