Incorrect semantic HTML on FAQ block
-
On the HTML that the FAQ block creates, the button and heading are incorrectly nested. This is the code that SEOPress outputs for the block heading:
<div id="wpseopress-faq-title-3723102207" class="wpseopress-wrap-faq-question">
<button class="wpseopress-accordion-button" type="button" aria-expanded="false" aria-controls="wpseopress-faq-answer-3723102207">
<h3 class="wpseopress-faq-question">Can you white label services?</h3> </button>
</div>The button block can not semantically hold a heading inside of it. Only phrasing content is allowed inside of a button.
The correct order is to have a heading hold a button.
Please see the example of proper accessible markup at https://designsystem.digital.gov/components/accordion/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Incorrect semantic HTML on FAQ block’ is closed to new replies.