Difference between revisions of "Aria-hidden false and tabindex"

From Level Access Web Labs
Jump to navigation Jump to search
Line 3: Line 3:
 
<hr>
 
<hr>
 
<div>
 
<div>
<a aria-expanded="false" aria-controls="d" href="#" onclick="document.querySelector('#d').setAttribute('aria-hidden','false');document.querySelector('#d').style.height='200px'; this.setAttribute('aria-expanded','true');" id="s"> Show </a>
+
<a aria-expanded="false" aria-controls="d" href="#" onclick="document.querySelector('#d').setAttribute('aria-hidden','false');document.querySelector('#d').style.height='200px'; this.setAttribute('aria-expanded','true'); event.preventDefault();" id="s"> Show </a>
 
<div style="overflow-y:hidden; overflow-x:hidden; height:0" id="d" aria-labelledby="s" role="region" aria-hidden="true" tabindex="-1">  
 
<div style="overflow-y:hidden; overflow-x:hidden; height:0" id="d" aria-labelledby="s" role="region" aria-hidden="true" tabindex="-1">  
 
<p>
 
<p>

Revision as of 17:45, 20 May 2020

This has aria-hidden false


Text with -1 expanded no region

Text with -1 region no expanded