Open dashaluna opened 9 years ago
Hi @dashaluna, yep you're thinking along the right lines:
class="heading-h2"
could be more generic eg. class="toc-item-h2"
Hope that gives you a few ideas!
Thanks @sanchothefat for the feedback, hugely appreciated :) I wanted to clarify some things:
<ul id="content-toc">
?class
to <ul id="content-toc">
?li
elements should have a class?Yo
<ul id="content-toc-1" class="content-toc">
Ref #19 <li>
is the right place for the class to give devs control at a higher level Ref #12 @sanchothefat also, any SEO or accessibility best practices I should consider here?
not that I know of, beyond perhaps a title attribute to say the link jumps you down the page. I don't think I'd bother just yet with that though.
@sanchothefat Hey, wanted your feedback on TOC HTML structure. Currently I have the following:
Can I improve it in any way? I was gonna add a
class
to eitherli
ora
with the header element, for exampleclass="header-h2"
, so it can be targeted for styling. But then thought I'd ask your advice in general :) Thanks!