Closed cbirdsong closed 7 months ago
Very much agreed. That's what I would like to do. I'm a little worried about conflicting with theme CSS though if I start modifying internal elements -- e.g., external link icons.
I think in the long run I need to implement it to work like the normal frontend checker -- just visually positioning toggles near elements. The challenge is doing that without modifying the DOM inside the block editor. I could generate my toggles at the end of the page and then position them absolutely relative to the page, which would work, at the cost of keyboard accessibility. But I'll play with your code and ponder in the interim.
Personally, if I had a theme using external link icons I would probably be fine having them overridden by this tool in the editor?
True. The only real excitement would be a partial replacement -- e.g., my content getting inserted, but having it bound by a max-width and clipped off or whatever. But that would be a bug for future me.
I'll have to experiment. I'm confident I can make it work, and I should be able to throw time at it this summer.
It's a little confusing to have the whole block marked for review when it has multiple links, only one of which is external:
It might be better if the message was anchored to the links themselves?
Some rough CSS - it likely would need to be scoped to paragraphs/headings/lists and not every link: