38617

Making dynamically updating content in a UITableView accessible for VoiceOver

<h3>Question</h3>

I'm trying to make my app more accessible and so far the standard accessibility things like labels and hints are doing wonders. I'm hitting a problem however with dynamically updating content that's displayed in a UITableView.

Each row of the table updates every second or so, but if I try to create each cell's accessibilityLabel at this point then I find that there is a problem with the VoiceOver reading out the selected label keeps interrupting itself as the label contents changes so the system just starts reading the label content from the beginning again (actually an odd quirk shows the voice over sometimes works correctly for the first cell that was selected, but upon selecting a new cell this bug returns).

I've tried to see if there's anyway to try and understand whether VoiceOver is currently active but as far as I can see there is only a notification posted when VoiceOver finishes

UIAccessibilityAnnouncementDidFinishNotification

There's no equivalent notification for when VoiceOver begins. So there's no way for my TableViewController to know that VoiceOver is currently active and that it shouldn't update any accessibilityLabels.

I'd hoped I could at least detect that one of my TableView cells was the selected accessibilityElement using the

accessibilityElementIsFocused

method. However in all my testing I've not been able to see this reliably fire for a custom UITableViewCell.

I also tried implementing the getter for accessibilityLabel for my custom cell hoping this may work, but sadly the same behaviour occurs.

The only solution I'm left with is a user configurable frequency for dynamic content accessibility updates, say 5, 10, 20 seconds... which can block me updating my label until I know that the last changed content would have definitely been read out. Actually even this could be interrupted if the user chose to select a cell at say 8 seconds after the last update, 2 seconds in for a 10 second limit and the label would update causing the voice over to restart.

Has anyone any ideas of how best to handle this dynamic updating content? I'm presuming the tableview cells are complicating matters a little, but in general I just don't understand how apple expects you to handle dynamic content. All it needs to solve this is another notification

UIAccessibilityAnnouncementDidStartNotification

Or even better a method to enquire as to whether VoiceOver is currently active. But I don't seem to be able to find any!

Thanks for your time, would really appreciate any tips on this. Cheers!


<h3>Answer1:</h3>

You want to do two things. First you want to take advantage of the "Updates Frequently" trait. This should improve the behavior of the app when the content is on.

This should help a lot. Then you alse need to provide a way for user to halt the updating content. Independent of whether you do the above, this is an absolute requirement to satisfy WCag 2.0 guideline 2.2.2.

来源:https://stackoverflow.com/questions/30583040/making-dynamically-updating-content-in-a-uitableview-accessible-for-voiceover

Recommend

  • MSBuild: How to read Assembly Version and FIle Version from AssmeblyInfo.cs?
  • if_attribute syntax problem on declarative_authorization
  • Core Data fetch request with WatchConnectivity
  • Can Java EE web applications be hosted on IIS
  • Check if Timer is running
  • Printing function pointer passed as a parameter results in '1' printed on the screen
  • Add business days without Saturday sunday and specific holidays in R
  • Running only one background thread in google appengine backend
  • Should I define variables in short blocks/functions of JavaScript? [closed]
  • get_permalink for json_decode not working
  • The initialization of non-local non-inline variables: does it take place strictly before the `main()
  • Spring MVC with AspectJ
  • NGINX/JENKINS: It appears that your reverse proxy set up is broken
  • Passing Objects to fragment without argument
  • Plot KMeans clusters and classification for 1-dimensional data
  • Youtube API Actionscript 3 and Thumbnails
  • Python: Why this error is coming?
  • c# selenium chrome-webdrive clicking button using class and title
  • AngularJS TypeError: Converting circular structure to JSON at Object.stringify (native)
  • Possible steps to improve SQL Server query performance
  • How to GetSemanticModel for any syntax tree in referenced projects of project compilation
  • How to order the ties in data so that the previously observed value appears first
  • Using Autofac with AJAX-enabled WCF Service
  • OpenCV::solvePNP() - Assertion failed
  • Custom Data Generator for Keras LSTM with TimeSeriesGenerator
  • Is there a way to run c# forms application without showing a gui window (like a console application)
  • Get last 15 lines from a large file in SFTP with phpseclib [duplicate]
  • Eric5: The OK button of 'new project' dialog is disable
  • Extract table from Powerpoint
  • Could not resolve all files for configuration ':react-native-vector-icons:classpath'
  • How to modify the way a ForeignKey field is rendered in a Django admin page to avoid browser crash?
  • How to process remote XML files with XSLT
  • C++11: Why rvalue reference parameter implicitly converted to lvalue
  • Slice assignment to tensorflow variable
  • Julia 1.0 UndefVarError - Scope of Variable
  • Year over Year Stats from a Crossfilter Dataset
  • Neo4j…how to get a visual representation of my data?
  • Change cell value based on cell color in google spreadsheet
  • How to handle div that is created dynamically in a table
  • Firebase: How to read from external DB?