Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
Accessibility for controls in stack view

I have a horizontal stackview with a button and label horizontally

When I turn on voice over, text in these buttons are not reading at all. All others works fine.

Below is how i setup my code. Please guide how to enable these. Not sure why this isn't working

I have my button text and label text taking dynamic values

Also if any info why the accessibilityIdentifier is used would really help. I couldn't find clear explanation for this

self.myHorizontalStackView.isAccessibilityElement = true

//Accessibility for Button
self.submitButton.isAccessibilityElement = true
self.submitButton.accessibilityTraits = UIAccessibilityTraitStaticText
self.submitButton.accessibilityLabel = screenControls.buttonTitle

//Accessibility for Label
self.addressLabel.isAccessibilityElement = true
self.addressLabel.accessibilityTraits = UIAccessibilityTraitStaticText
self.addressLabel.accessibilityLabel = screenControls.address1
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

So the problem looks like it's coming from your stackView itself. See this other SO question/answer on the subject:

If a container view is accessible, its child views are often obscured to avoid confusion about what the user is trying to interact with.

So here, change your first line in the snippet you shared to:

self.myHorizontalStackView.isAccessibilityElement = false

and that should enable VoiceOver to find the subviews of the stackView.

As far as your other question:

Also if any info why the accessibilityIdentifier is used would really help. I couldn't find clear explanation for this

If you are asking what the identifier would be used for, it's primarily for testing purposes. By setting unique identifiers to your views, your tests can easily use the accessibility engine to find specific views and perform any actions you'd want to test. In terms of VoiceOver, the accessibilityIdentifier does not have a role.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!