Skip to content

Conversation

@ada-workbackai
Copy link

Summary

Fixes WCAG 1.1.1 (Non-text Content) by adding aria-hidden="true" to the SVG element inside z-icon's shadow DOM.

Issue: Decorative icon images in buttons (such as the modal close button) are exposed to screen readers, even though the parent button has proper accessible text. This creates redundant and confusing information for screen reader users.

Solution: Added aria-hidden="true" attribute to the SVG element within z-icon's shadow DOM. This provides defense-in-depth alongside the existing aria-hidden="true" on the Host element, ensuring consistent behavior across all assistive technologies.

Impact

This fix applies to all z-icon instances throughout the design system, ensuring decorative icons are properly hidden from assistive technologies. The button's existing accessible label ("chiudi modale") remains visible to screen readers.

Test Plan

  • Verified modal close button has proper accessible name
  • Verified icon is hidden from accessibility tree
  • Tested with Playwright accessibility snapshot

Evidence

View full audit details: https://app.workback.ai/dashboard/issue/93/


WCAG Reference: 1.1.1 Non-text Content (Level A)

Adds aria-hidden='true' to the SVG element inside z-icon's shadow DOM to ensure decorative icons are properly hidden from all assistive technologies.

While the Host element already has aria-hidden, adding it to the SVG provides defense-in-depth and ensures consistent screen reader behavior across different assistive technologies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants