Fix button not allowed inside anchor in footer#551
Merged
adityatelange merged 2 commits intoadityatelange:masterfrom Sep 5, 2021
danielfdickinson:pr-top-link-button-not-allowed
Merged
Fix button not allowed inside anchor in footer#551adityatelange merged 2 commits intoadityatelange:masterfrom danielfdickinson:pr-top-link-button-not-allowed
adityatelange merged 2 commits intoadityatelange:masterfrom
danielfdickinson:pr-top-link-button-not-allowed
Conversation
Signed-off-by: Daniel F. Dickinson <[email protected]>
Owner
adityatelange
left a comment
There was a problem hiding this comment.
Or maybe we can remove span also, and put the attributes to a tag
Contributor
Author
|
I suspect the CSS styling trick that creates the up arrow requires that there be a sub-element, but I will test. Sorry, I see it is an SVG, not the CSS styling trick. Moving the attributes ought to work, then. |
Move attributes to anchor and remove not required span (which was used place of a button which was against HTML spec). Signed-off-by: Daniel F. Dickinson <[email protected]>
|
Kudos, SonarCloud Quality Gate passed!
|
Contributor
Author
|
I made the requested change, and it works as expected for me (the access key still works, it looks right, hover is good, the icon is only displayed after scrolling down a bit, etc). |
kylethedeveloper
pushed a commit
to kylethedeveloper/hugo-PaperMod
that referenced
this pull request
Feb 21, 2023
…aint (adityatelange#551) Move attributes to anchor and remove not required span (which was used place of a button which was against HTML spec).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








What does this PR change? What problem does it solve?
HTML validators complain (correctly) about the footer "top-link" which has a <button> inside an anchor (<a>) element.
As per Mozilla Developer Network page for <a> element allowed properties 'interactive elements' (including <button>) are not allowed inside an anchor element (<a>).
I replace the
<button>with a<span>and add anaria-hidden="true"to avoid screen readers repeatinggo to top, which is already present as anaria-titleon the anchor element.Was the change discussed in an issue or in the Discussions before?
Closes #549
It is currently in action on https://www.princesandmadmen.ca.
PR Checklist