orbit-swiftui icon indicating copy to clipboard operation
orbit-swiftui copied to clipboard

Use identifiers and labels for `Tabs` and `SegmentedSwitch` buttons

Open PavelHolec opened this issue 1 year ago • 0 comments

To enable proper accessibility of content inside these components, we should:

Solution 1 (simpler, not accurate):

  • mark content with isButton trait
  • hide button layer from accessibility
  • Blocker: The trait isSelected needs to be propagated to correct content

Solution 2 (complicated, accurate):

  • add preference keys for content that include accessibilityIdentifier and textLabel
  • use these keys when creating buttons to assign them IDs and labels
  • hide content layer from accessibility
  • active button keeps isSelected trait

PavelHolec avatar Jun 01 '23 07:06 PavelHolec