Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
The skiplink is wrapped in a div with an id - thats against the guidelinies for the theme layer & is unnessary markup
<div id="skip-link">
<a href="#main-content" class="visually-hidden focusable">
{{ 'Skip to main content'|t }}
</a>
</div>
Proposed solution
proposed fix is to add the #skip-link
to .skiplink
& change the css accordingly in seven & bartik
<a href="#main-content" class="visually-hidden focusable skip-link">
{{ 'Skip to main content'|t }}
</a>
Comment | File | Size | Author |
---|---|---|---|
#3 | kill-skip-link-divwrapper-2.diff | 3.71 KB | mortendk |
#1 | kill-skip-link-divwrapper.diff | 3.72 KB | mortendk |
Comments
Comment #1
mortendk CreditAttribution: mortendk commentedand patch
Comment #2
amateescu CreditAttribution: amateescu commentedThis cannot work as the 'skip-link' class is now set on the anchor element. I guess you actually want a.skip-link :)
Same for everywhere in the patch.
Comment #3
mortendk CreditAttribution: mortendk commentedDoh im an idiot ;)
fixed em thanx for the heads up
Comment #4
mortendk CreditAttribution: mortendk commentedbot get to work
Comment #5
mortendk CreditAttribution: mortendk commenteddoh this is a duplicate moving it to here #1982256: Clean up html.html.twig markup