html - Correct HTML5/ARIA markup for collapsable submenus -


I tried to locate to mark the correct way navigation with collapse sections using HTML5 and ARIA I am doing

It is that I have done so far:

  & lt; Nav> & Lt; H2 id = "heading-overview" aria-controls = "section-overview" & gt; Overview & lt; / H2 & gt; & Lt; Ul id = "section-overview" aria-labeledby = "heading-overview" aria-expanded = "false" & gt; & Lt; Li & gt; & Lt; An aria-selected = "true" & gt; Layout & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A & gt; Color schema & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; H2 id = "heading-typography" aria-controls = "section-typography" & gt; Typography & lt; / H2 & gt; & Lt; Ul id = "section-typography" aria-labeledby = "top-typography" aria-expanded = "false" & gt; & Lt; Li & gt; & Lt; A & gt; Size & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A & gt; Color & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A & gt; Type & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Neo & gt;  

For me, it seems like a very big feature, can it be that I am attaching attributes which are otherwise implied in the markup? Or can I label it any other way?

HTML 5

If you h1 , you might want to use the clear section elements so that submenu headings can be shared under an item in the document settings.

Currently your outline is

  1 specific  section  elements you get:  
  1 intimate {body} 1.1 without title {NIT} 1.1.1 Overview (section) 1.1.2 Typography {section}  

ie,

  & lt; NAV & gt; & LT; section & gt; & LT; h2 & gt; Overview & lt; / h2 & gt; & Lt; / sECTION & gt; & LT; section & gt; & LT; h2 & gt; typography & lt; / h2 & gt; & Lt; / sECTION & gt; & Lt ; / New & Gt;  

Wi-ARIA

This feature is called, no aria-labelbyby .

if If you want you can transfer aria-labeledby attributes from ul to section

but I think that you In fact, aria-labelbedby is not required, because you are using titles that are titled, from the default HTML words, the content section of their "label". However, HTML5 them does not denote unexpected top-ARIA semantics, so you also grows, moves Y-Aaiaia level to keep clearly in this regard.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -