Widget HTML solutions
-
I wrap widgets to <section> elements, and widget-title is <h1>. As stated in HTML5, this is the solution. But my screen-reader testers say that this is confusing during the first check of the webpage. Do you have any reflection to this?
The page I need help with: [log in to see the link]
-
In short use
<h2>
in widget titles. That would make more sense for headings hierarchy.And what is the parent
<h1>
? Accessibility needs hierarchy of headings.It doesn’t necessarily need a parent heading. But if you want to put parent heading, make that
<h2>
inside<aside>
and widget titles<h3>
.Thank you. This is also a possibility.
You are right. Hierarchical headings is not a requirement but a advice.
Authors are encouraged to nest headings hierarchically.
https://www.w3.org/TR/WCAG20-TECHS/H69.html ?
- This reply was modified 6 years, 7 months ago by Edelényi Zsolt.
There should definitely be headings hierarchy but that’s up to you how you do it. I personally use one
<h1>
on every view. But not all sections needs “parent” heading.That
<h1>
is same as the title of the page?Title of the page, post, archive title etc. Look how it’s done in _s theme.
That’s cool.
<script type=’text/javascript’ src=’http://www.for-click.com/wp-content/themes/point/js/customscripts.js?ver=20120212′></script> <script type=’text/javascript’ src=’http://www.for-click.com/wp-includes/js/wp-embed.min.js?ver=4.8.2′></script>
<script id=”dsq-count-scr” src=”//www-for-click-com.disqus.com/count.js” async></script>
- The topic ‘Widget HTML solutions’ is closed to new replies.