Thanks for your thoughts on this @Marius, much appreciated.
This can be opened to debate and ends up asking the question where the modal “content” really starts. Do you consider that when you modify the tag on the modal block, you are modifying the container itself or more specifically the content wrapper?
I’d love to have your suggestions on a11y enhancements here. Currently, I can’t seem to find official directives on what a “modal” should contain like attributes.
As I see it, a modal is a visual way of showing a section or element. Therefore, should we even notify users who can’t play with this concept that the modal is being toggled on/off?
This is meant to be a fallback in case js is not supported for whatever reason (you can trigger the modal appearance with its ID, no js needed at all). The link default behaviour is disabled when js is supported.
Not so sure about this. The modal should be considered to be outside the main content since its visual role is to be hidden by default.
If you put the modal inside wp-site-blocks, it is possible to interfere with global parts that don’t fall inside wp-site-blocks
.
This is not a fixed decision, and I’m happy to revisit where we place the modal markup.