Describe the bug
If in block elements (e.g. Listings) with the characters * ">" * or * "<" * are used in the text, there is a problem with the Aria labels for links.
The entire text of the block is included in the Aria labels. With all the special characters. The special characters are not escaped. This will destroy the output.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Before copy the content to the Aria label - escape the special characters / html charakters
Example: "<" for < | ">" for >
Another question: Why is the entire text of the block used for the Aria labels?
Desktop (please complete the following information):
Version of Gutenberg
I feel like I saw a similar issue before about this 馃
Right, in https://github.com/WordPress/gutenberg/pull/12154 it was suggested to use a screen-reader-text appended to the link content instead of using aria-label. Unfortunately, that hasn't been addressed yet.
Another question: Why is the entire text of the block used for the Aria labels?
This is a bug, tracked in https://github.com/WordPress/gutenberg/issues/12325
To clarify: insert a link with the text link including a greater than > character:

Generated markup (notice the > within the HTML attribute):

Layout breakage in the front end, due to invalid markup:

Thank you for the clarification and the included screens. Due to #12325 the error happens even if the greater than > character is not in the link text itself.
Right! 馃槥
Related (partially duplicates):
Fixed by one of:
Easily reproducible from the description here:
https://wordpress.org/support/topic/a-minor-gutenberg-hyperlink-bug/
Just to note this was reported again on Trac, see https://core.trac.wordpress.org/ticket/46114
Removing the Accessibility label because not a real a11y bug. I guess it should get prioritized though. /Cc @youknowriad
This seems fixed by #9963
Most helpful comment
To clarify: insert a link with the text link including a greater than
>character:Generated markup (notice the
>within the HTML attribute):Layout breakage in the front end, due to invalid markup: