I created a hide/reveal step-by-step component that shows content if you click on the step number.
It works as intended, but I'm having trouble ensuring its accessible.
- I can't seem to tab using my keyboard over the 1-4 links, even though they are
<a>
tags.
<div class="progress-steps">
<a class="showSingle" target="1"></a>
<a class="showSingle" target="2"></a>
<a class="showSingle" target="3"></a>
<a class="showSingle" target="4"></a>
</div>
- I also want to ensure that the user can also activate the hidden content via the keyboard.
<section id="progress-content" class="hide">
<div id="div1" class="targetDiv"><h3>Initiation</h3>
<p><strong>Fill out the </strong><a class="bold-link" href="https://app.smartsheet.com/b/form?EQBCT=b6923f4b9dc347f384936e342e5d2b58" target="_blank" rel="noopener">Project Request Form</a>: Each request goes through a review process to determine if the project is ready to be worked on.</p>
</div>
<div id="div2" class="targetDiv"><h3>Planning</h3>
<p><strong>Kickoff</strong>: After approval, we will schedule a meeting between all involved parties to discuss the scope and direction of the project.</p>
</div>
<div id="div3" class="targetDiv"><h3>Execution</h3>
<p><strong>We get to work!</strong> The plan will be carried out — involving all key stakeholders. The final product will be tested and implemented.</p>
</div>
<div id="div4" class="targetDiv"><h3>Assessment</h3>
<p><strong>Metrics for Success</strong>: After completion of the project, we will obtain sign-off of deliverables and revisit in 6-12 months to ensure stakeholders needs are met.</p>
</div>
</section>
I've tried playing around with the :focus
and inserting role="tab" aria-selected="true"
into the <a>
tags.
Here's my code pen: https://codepen.io/ckatz/pen/gJmgbq
I want to make sure that anyone using a keyboard can use this component effectively.