My question is related to Accessibility standard.
I have a modal with multi-step form, when modal reaches final step which only has 1 actionable item that is close button, focus goes to close button.
Team suggested me to set focus on the text that is displayed for which i have to add tabIndex="0" on the screen.
<div tabIndex="0">Completed All Steps.</div>
This is non-interactive, and it voilets eslint jsx-a11y/no-noninteractive-tabindex.
Ideally solution that i can think of this to add an hidden alert and keep focus on close.
<div id="expirationWarning" role="alert">
<span class="hidden">Completed All steps.</span>
</div>
Which one is the correct based on standard or, third better option ?
Tried to look up for standard for this, could not find any.