terryworona / TWMessageBarManager

An iOS manager for presenting system-wide notifications via a dropdown message bar.
MIT License
1.77k stars 191 forks source link

Add implementation of UIAccessibilityContainer Protocol #32

Closed JanenePappas closed 10 years ago

JanenePappas commented 10 years ago

Addresses #31, to add accessibility; creates accessible element consisting of the title and description when a new message is shown and notifies the framework to read the message

JanenePappas commented 10 years ago

@terryworona You would prefer just the accessible element instance and not the usual pattern of keeping a collection? Certainly can do it that way. Will modify and re-submit.

The accessibility frame is actually irrelevant (found after more testing after your comment). I'll remove it since the user can't tap on it anyway.

terryworona commented 10 years ago

I'm not really saying to do it one way or another, just curious why it's a collection if we only really have a single element to keep track of; I guess a collection scales better for (potential) future changes.

JanenePappas commented 10 years ago

I've submitted an updated push for keeping a single element. I would agree that a collection is definitely more scalable, however.

cdzombak commented 10 years ago

:+1:

terryworona commented 10 years ago

This looks good. I'll pull it in later tonight or tomorrow. Thanks for the contrib.

JanenePappas commented 10 years ago

Great, thanks Terry. Happy to add something to the project.

Janene

On Mar 31, 2014, at 8:04 PM, terryworona notifications@github.com wrote:

This looks good. I'll pull it in later tonight or tomorrow. Thanks for the contrib.

— Reply to this email directly or view it on GitHub.

terryworona commented 10 years ago

I pulled it in today and made some cleanup changes.

I'm a bit of a novice when it comes to accessibility; but I tested it on device and the voice doesn't exactly work (the message is cut off when I tap the button to present it). Am I missing something?

JanenePappas commented 10 years ago

The changes are structured to initiate the voice-over immediately when the banner is presented. It does not cut out unless the user taps on it, as tapping on the banner is set to dismiss it in itemSelected. If you do nothing, does it complete reading of the message?

terryworona commented 10 years ago

The voice over begins, but is then cut off by another voice over describing the button that was pressed to show the message; this is all within the demo app.

You mind checking out the demo project in master to see if you can reproduce?

JanenePappas commented 10 years ago

Will do.

terryworona commented 10 years ago

Sweet. Go ahead and pull now, I just checked in a last minute change! Thanks!

JanenePappas commented 10 years ago

It appears the demo's view controller is affecting accessibility. I've put your version of TWMessageBarManager in my app and it works correctly. Researching more.