SwiftLint tool should fail builds if accessibility tags are not present for UIControls in iOS

Hi Team,

We are having ebook reading application developed in IOS platform. We want to use swiftLint tool to check whether accessibility enabled for all UIControls which are in storyboard as well as programmatically initialised controls.

Our requirement: We are supporting voice over for visually disabled people. Accessibility should be enabled for all UI controls (eg : UIButton, UILabel… etc) in application to support voice over.

Use case : When we make a build, if the controls doesn’t have accessibility enabled true property, then the build should fail in Xcode. SwiftLint tool should fail builds if accessibility tags are not present for UIControls in the application.

Kindly guide us how to get all UIElements in the application and how to check the property values of the UIElement instance.

For example, get all the UILabels and check whether the UILabels are set as IsAccessibilityElement is True. Likewise, we need to get all UIElements and check the IsAccessibilityElement property value for each UIElement instance.

Could you please suggest on the above so that, we can try our best to implement it in SwiftLint.

Hi @karthika_beulah. SwiftLint is a community-run open-source project. It would be best to repost your message as an issue at https://github.com/realm/SwiftLint/issues to get attention from the community.

1 Like

Thanks for your response. I posted in https://github.com/realm/SwiftLint/issues too. But i didn’t get any response. Is there any SwiftLint person to contact. it will be helpful if i get ant contact mail id to clarify it.