-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HeadingPermalinkRenderer Accessibility #1024
Comments
You might be better off finding the markdown that contains an empty link (e.g. |
What I am saying is that the Heading PermaLink Extension (https://commonmark.thephpleague.com/2.4/extensions/heading-permalinks/) creates an empty link before or after a heading as the destination of each item in the Contents and accessibility tools flag empty links as a serious error (https://webaim.org/techniques/hypertext/hypertext_links). The destination should not be a link at all and removing the href attribute from the destination tag seems to do just that. But is that the best way to do it? |
Ah, that makes sense. So you're saying that there are circumstances in which |
This is the code of a heading:
And this is the Contents item:
It works fine but does not pass accessibility validation. |
The links are technically not empty, as they do contain a Could you share more details about why Joomla thinks this link is empty? Are they expecting a certain minimum number of characters or something? |
Going back to the code of a heading I quoted:
This is a link that points to itself! I think the heading should really be a target, like this:
Not sure if the class is really needed! |
Description
My System - Joomla Accessibility Checker tells me there is a problem with empty links. I fixed it in:
league/commonmark/src/Extension/HeadingPermalink/HeadingPermalinkRenderer.php
by commenting out line 70 so the href attribute does not appear in the anchor. Could that be right?
Example
Did this project help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: