What fresh hell is THIS now? - Patrick Lauke
<fieldset aria-labelledby="search-label"> <label> <span id="search-label">Search Catalog</span> <input type="search"> </label> <button type="submit">Search</button> </fieldset>
mrr? hello?
how do I escape this madness?
<fieldset> <legend> <span>Search Catalog</span> </legend> <div> <div> <input type="text"> </div> <input type="submit" value="Search"> </div> </fieldset>
<fieldset> <legend id="search-legend"> <span>Search Catalog</span> </legend> <div> <label aria-labelledby="search-legend"> <input type="text"> </label> <input type="submit" value="Search"> </div> </fieldset>
<fieldset aria-labelledby="search-label"> <label> <span id="search-label">Search Catalog</span> <input type="search"> </label> <button type="submit">Search</button> </fieldset>
The blue/large part is the title, the tiny grey text is some sort of reference code.
http://dir.agosto.nl/dump/Screen%20Shot%202015-11-18%20at%2015.59.13.png
How should this be marked up?
<h2>Title text <small>FAQ-000001</small</h2>
Or:
<h2>Title text</h2> <p>FAQ-000001</p>
Or:
<h2>Title text</h2> <p><span class="hidden someway">Reference code:</span>FAQ-000001</p>
Or (although I'm not sure in what order content/label are read):
<h2>Title text</h2> <p aria-label="Reference code">FAQ-000001</p>
Or:
…
$form['search'] = array( '#title' => 'Search Catalog', '#description' => '', '#tree' => FALSE, '#type' => 'fieldset', '#collapsible' => FALSE, );
<h2>Title text</h2> <p><span aria-label=":Reference code:"></span>FAQ-000001</p>
aria-activedescendant
to read out in VoiceOver + Safari. It works just fine in VO + Chrome, NVDA + Firefox, and JAWS + IE. Is this a known bug?
@MichielBijl
If so, the spec should reflect
the spec that defines it does reflect it http://w3c.github.io/aria/html-aam/html-aam.html#accessible-name-and-description-calculation
aria-labelledby
on the content div the right approach? Or including a visually-hidden heading with the same text as the selected “tab”?