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

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.

We had a walk through for SwiftLint rules, but we couldn’t find the rule to check the accessibility enabled/ disabled controls.

SwiftLint tool should fail builds if accessibility tags are not present for UIControls in the application.

Could you help us to resolve it.

Hi @karthika_beulah
Without knowing about the specifics, If you checked all options, then it’s likely not supported. SwiftLint is an open source tool managed by the community, so you can either make a feature request to the community on github or if you want to contribute try to add it yourself with a PR.

Cheers
Brian

1 Like

Hi @Brian_Munkholm

Thanks for your response.

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.

For achieving this requirement, we like to use SwiftLint tool.
If SwiftLint is supporting this feature, could you explain how to use it. If not, Could you take it as feature request?

Hi @karthika_beulah
I’m sorry if I was unclear. I don’t have the answer to your specific question. But as the community who maintain the SwiftLint tool are using Github for feature requests, the best approach is for you to request that feature by going to Issues · realm/SwiftLint · GitHub and create a new feature request there. When you do that you will also be notified of the progress of that feature request going forward.
Hope this helps you!

1 Like

Thank you @Brian_Munkholm