Ensure that accessibility features do not create security vulnerabilities by allowing unintended interactions or providing misleading information to assistive technologies. This includes proper ARIA attribute usage and ensuring hidden or inactive elements are truly inaccessible.
Ensure that accessibility features do not create security vulnerabilities by allowing unintended interactions or providing misleading information to assistive technologies. This includes proper ARIA attribute usage and ensuring hidden or inactive elements are truly inaccessible.
Key practices:
aria-describedby
for plain text descriptions and aria-details
for complex content that requires navigationinert
attribute on hidden or inactive UI elements (like carousel slides) to prevent screen reader interactionExample of proper implementation:
// Good: Inactive carousel slides are made inert
<animated.div
className='featured-carousel__slide'
data-index={index}
inert={index !== slideIndex}
>
<StatusContainer id={statusId} />
</animated.div>
// Good: Appropriate ARIA attribute for text content
<button
aria-describedby={descriptionId}
onClick={onClick}
>
Show content
</button>
<p id={descriptionId}>{textContent}</p>
This prevents accessibility-related security issues where users might inadvertently interact with hidden elements or receive incorrect information through assistive technologies.
Enter the URL of a public GitHub repository