how can I make this snippet accessible?
<div tabindex="0">
Show More
<ul>
<li><a href="#">Hidden Content</a></li>
<li><a href="#">Hidden Content</a></li>
<li><a href="#">Hidden Content</a></li>
</ul>
</div>
CSS:
div > ul
{display:none;}
div:hover > ul, div:focus > ul
{display:block;}
I wonder if it is possible to make <ul>
visible also with keyboard navigation
while focusing its contents
tabindex
minimum value is0
: you are talking about-1
, which means "not focusable". Also, I'm not navigating away. I'm still in the focused tree. I thought:focus
worked like:hover
, where you:hover
an element as you are:hover
ing its parent tree as well.:focus
is enabled on target and on target only – Schnauzer<a>
s needtabindex=0
not just the container – Kobayashi