Skip to content

Image(dash:): VoiceOver reads the asset name of .custom icons #38

Done

Description

@romchornyi

Summary

Image(dash:) (Foundation/Image+DashUI.swift) builds .custom icons with Image(name, bundle:). An image built that way is an accessibility element whose label is its asset name, so VoiceOver reads names such as "toast-warning, image".

This was measured on Toast with the accessibility tree on the iOS simulator. The toast is fixed separately: its icon is hidden from VoiceOver, and hosts can pass an accessibilityLabel:. The other components draw icons through the same path, but they were not measured one by one:

  • MenuItem (leading and trailing icon)
  • TransactionView (icon and secondary icon)
  • RadioButtonRow
  • SheetFeature
  • NavigationBarCircleIcon
  • NavigationBar (custom element icon)
  • Criteria
  • ConverterCard (ConverterArrowBadge)
  • SystemMessageView
  • DashButton (icon in the button label)
  • SearchBar
  • AddressFieldView
  • DashAmount
  • DashBalanceView
  • SwapAmountView
  • ConverterCard (its other icons)
  • SuccessIllustration and ErrorIllustration

Some of these already set accessibility modifiers on the row, which may hide or combine the icon. That also needs checking per component.

Proposed fix

  1. Dump the accessibility tree of each component above, with a .custom icon and with an SF Symbol.
  2. Then pick one:
    • make .custom icons decorative by default (Image(decorative:bundle:) in Image(dash:)), since a text label sits next to the icon almost everywhere;
    • or add an optional label to DashIconSource.custom, for the few icons that carry meaning on their own.

Both change what VoiceOver reads in host apps, so the fix needs a note in the release notes.

Related: the accessibility audit of the shared components (ticket 32072).

Activity

  1. romchornyi commented on Dec 4, 2026

    @romchornyi
    CollaboratorAuthor

    Fixed by #91, #92 and #93.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions