Skip to main content


Fellow #iOS #swift #swiftui developers. Do you know if the ButtonRole structure actually does anything purposeful? With #VoiceOver, I cannnot get any indication whatsoever about the button’s role, while at the AppleDeveloper documentation site: developer.apple.com/documentat…, they state that such an info should be conveyed. Is there any visual indication of the role? If so, what?
in reply to Arkadiusz Świętnicki 🇨🇳 I HAVE MOVED

As far as I know, button role influences visual appearance (red text for buttons with a 'destructive' role in views/menus/alert dialogs, or a red background if used as part of `swipeActions`), and a 'cancel' button role will re-order that button to be last when inside an alert or confirmation dialog.
Unknown parent

mastodon - Link to source
robb
Since Button also functions a kind of labeled function to place in e.g. Menu or Swipe Actions, I there's a lot of surface area to check – that said, this kind of semantic tagging also pays off long term.
in reply to robb

@dlx Of course I get it. I just was confused as I, as a blind developer did not see any indication whatsoever.
@robb