Buttons with a title, use it as its default accessibility label. Most cases, that's just perfect. But there's a few times that you might want to tweak it. Maybe the image is part of what the button does, or the text in the title is not very clear.

Buttons with a title, use it as its default accessibility label. Most cases, that's just perfect. But there's a few times that you might want to tweak it. Maybe the image is part of what the button does, or the text in the title is not very clear.


Sometimes, buttons change meaning, for example when toggled. An example is a play button, tap it and it becomes a pause button. In such case, updating its accessibility label will be clearer than trying to convey the change with traits or values.
@NSSpain has a great history of having amazing accessibility talks in their schedule! “Accessibility in the Real World”, by @Sommer: https://vimeo.com/235317172 “How to build an app for everyone”, by @NovallSwift: https://vimeo.com/362163043 The super fun "Choose your own SwiftUI adventure - 3 Accessibility", by @twostraws and @PinkerStraws: https://vimeo.com/481768105 And, of course, this year's great "Bas: My Accessibility Story", by @basthomas: https://vimeo.com/751176747

You can add an observer to listen for changes in the content size category, in case it is more convenient than overriding traitCollectionDidChange(_:).
Content © Daniel Devesa Derksen-Staats — Accessibility up to 11!