0

Hello to the community again! I'm trying to validate a Wordpress site and I got the following 4 errors that most probably are connected:

Line 182, Column 26: Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.

Line 182, Column 27: Element span="la not allowed as child of element a in this context. (Suppressing further errors from this subtree.) Content model for element a: Transparent, but there must be no interactive content or a element descendants.

Line 182, Column 34: Stray end tag span.

Line 183, Column 4: End tag a violates nesting rules.

The code in question is the following:

    <footer id="colophon" class="site-footer" role="contentinfo">
        <div class="footer-widget-area">
        <div class="wrapper">
            <div class="flex-grid">
                            <div class="col">
                    <div id="custom_html-5" class="widget_text widget widget_custom_html"><div class="textwidget custom-html-widget"><script data-account="iFDG9kXlfW" src="https://cdn.userway.org/widget.js"></script></div></div>                </div>
                                                </div>
        </div>
    </div>
    <div class="site-info">
    <div class="wrapper">
                    copyright all rights reserved            <span class="sep"> | </span>
                Theme: Minimal Blog by <a href="http://wpinterface.com/" rel="designer">WPinterface</a>.    </div>
</div><!-- .site-info -->


<a id="scroll-top">
    <span="la la-arrow-up"></span>
</a></footer>

You can also check the site, it's only in Greek yet though but here's the link: https://tsimiklidentist-petalidi.gr/

Thank you all in advance for your time, any help will be really appreciated!

1 Answers1

0

two things

  1. <a> must have a href to be valid (not part of your error, just a best practice). Leave it as an anchor (<a>) and set the href="current page URL" in the generated HTML so that if JavaScript fails it will simply reload the page, giving the same effect.

  2. <span="la la-arrow-up"></span> - did you miss class="" you can't have a span equal to something. Instead it should be <span class="la la-arrow-up"></span>.

Change your scroll to top arrow to:-

    <button id="scroll-top">
        <span class="la la-arrow-up"></span>
    </button>
GrahamTheDev
  • 22,724
  • 2
  • 32
  • 64
  • Graham Ritchie, you are great my friend! I did as you said and the errors disappeared! Actually it was my fault since the original code of the the minimal blog theme had and had to change i to span in order to fix a validator error and forgot to add class.Thank you my friend! – the_black_planet Feb 24 '20 at 11:48
  • no problem, mark the answer as accepted when you get chance, good luck with the accessibility fixing! – GrahamTheDev Feb 24 '20 at 12:10