Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm running my website through the W3C Markup validator(http://validator.w3.org/) and I'm getting the following error:

The aria-controls attribute must point to an element in the same document. …"ui-accordion-1-header-2" aria-controls="ui-accordion-1-panel-0" tabindex="0">

I've read through the documentation and I not sure where I'm going wrong.

My HTML looks like this:

<ul class="mobile-primary ui-accordion ui-widget ui-helper-reset" role="tablist">

<li><a class="mobile-tab-trigger ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-accordion-icons" href="#" role="tab" id="ui-accordion-1-header-0" aria-controls="ui-accordion-1-panel-0" aria-selected="false" tabindex="0"><span class="ui-accordion-header-icon ui-icon ui-icon-triangle-1-e"></span>Link 1</a>

<ul class="mobile-secondary mobile-expand ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" id="ui-accordion-1-panel-0" aria-labelledby="ui-accordion-1-header-0" role="tabpanel" aria-expanded="false" aria-hidden="true" style="display: none;">
<li><a href="/Link2/" title="Link 2">Link 2</a></li>
</ul>

</ul>

As you can see I have aria-controls="ui-accordion-1-panel-0" and the subsequent tag is id="ui-accordion-1-panel-0".

I'm not sure what is causing the errors.

Any help appreciated.

share|improve this question
    
Testing that snippet by direct input seems to work for me, can you provide a link to the page you're trying to validate? x –  Emily Shepherd Apr 3 at 15:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.