I'm currently working on accessibility. The form that I'm working on is broken into steps. Each step has is on template, when I go from step 6 into step 7, JAWS does not read the <h1>
element.
From the image above, JAWS goes from step 6 into "Including you, how many people are in your houseld" Which is a <label>
tag. I was thinking about adding an aria
attribute. What is the best approach so that the screen reader doesn't start screening this page from
<label class="c-question__label" for="household-members">{{ __('Including you, how many people are in your household?', 'accessnyc-screener') }}</label>
Here is thecode:
<fieldset class="{{ styles.fieldset }}" id="step-7" data-track-key="Screener Step: 7"
data-track-data='[{"WT.si_n": "ScreeningHH"},{"WT.si_p": "7-NumOfHHMembers"}]'>
<div class="{{ styles.padding }}">
<div data-js="step-title" class="{{ styles.number }}">{{ __('Step 7 of 10', 'accessnyc-screener') }}</div>
<h1 class="{{ styles.heading }}">{{ __('Tell us about your household.', 'accessnyc-screener') }}</h1>
<div class="c-question">
<label class="c-question__label" for="household-members">{{ __('Including you, how many people are in your household?', 'accessnyc-screener') }}</label>
<p>{{ __('This is usually family members who you both live with and share important resources like food and bills. Only count your roommates if you often buy and prepare food together.', 'accessnyc-screener') }}</p>
<label class="c-question__label" for="household-members">{{ __('Number of People (max. 8)', 'accessnyc-screener') }}</label>
<div class="c-question__container" data-js="question">
<input id="household-members" type="number" name="Household.members" data-type="integer" min="1" max="8" required value="1">
</div>
</div>
<div class="pt-2">
<a class="btn btn-primary btn-next btn-small js-screener-validate-step" href="#step-8" role="button">{{ __('Continue', 'accessnyc-screener') }}</a>
</div>
</div>
</fieldset>{# /#step-7 #}
What is the best approach to fix this?
` a tabindex of 0. that's bad accessibility advice. only interactive elements should be tabbable. it's confusing for screen reader users to tab to an element that cannot be interacted with. it's easy for a screen reader to navigate to static text that is a heading by using the 'H' key.
– slugolicious Aug 28 '18 at 04:14` headers
– Steven Aguilar Aug 28 '18 at 13:28` but only in step 7 it does not.
– Steven Aguilar Aug 28 '18 at 17:30