Accessibility issues with NSPopover

  • Hi everyone.

    I am experiencing grave problems setting up decent accessibility on my NSPopover. Most issues affect VoiceOver users, but some affect all users (not even accessibility).

    1. When NSPopover is shown, VoiceOver will only report the CONTENTS of the popover (it will say: "3 items" never any title. I used whatever I could, both programmatically and in .xib files, to no avail. I know that my Popover's Accessibility description is OK, because if i hit ctrl-option-F2-F2 (VoiceOver's command for "Window List" The popoever is rightly named.

    2. Once my Semi-Transient popoever loses focus, I can not set it back on the popover (or any of its subviews). I need to do this programmatically, because the accessibility user who lost the focus NEVER HAD A CHANCE to know that this popover ever existed.

    3. As NSPopover manages its internal window in a very-opaque way, I can't find a way THAT WORKS to set up the "initialFirstResponder", or window title, or any accessibility attributes on the popover window.

    4. I was not able to set up accessibility link from anywhere else in my application to the popoever (or one of its subviews).

    There is very little documentation and help on NSPopovers, and to say the truth, it breaks Apple's most basic Cocoa design. NSPopover is neither Model, View or Controller. I wonder...

    Please advise...

    Motti Shneor, Mac OS X Software Architect & Team Leader
    Spectrum Reflections Ltd.
    +972-54-3136621
  • On 9 May 2012, at 7:16 AM, Motti Shneor wrote:

    > I am experiencing grave problems setting up decent accessibility on my NSPopover. Most issues affect VoiceOver users, but some affect all users (not even accessibility).

    Accessibility can be arcane (and buggy). Your best bet is the accessibility-dev list. An accessibility engineer follows it fairly closely.

    — F
  • On May 9, 2012, at 5:16 AM, Motti Shneor <sumac...> wrote:

    > 3. As NSPopover manages its internal window in a very-opaque way, I can't find a way THAT WORKS to set up the "initialFirstResponder", or window title, or any accessibility attributes on the popover window.

    Can you override -viewDidMoveToWindow in the appropriate view to set the initialFirstResponder on self.window? I agree this is pretty hackish; NSPopover should expose initialFirstResponder directly. (Actually, NSViewController should probably do that, because anywhere you're adding and removing view controllers you're likely going to want to make the appropriate view first responder.)

    >
    > 4. I was not able to set up accessibility link from anywhere else in my application to the popoever (or one of its subviews).
    >
    > There is very little documentation and help on NSPopovers, and to say the truth, it breaks Apple's most basic Cocoa design. NSPopover is neither Model, View or Controller. I wonder...
    >

    I wouldn't go this far. I look at NSPopover like NSWindowController. Of course you don't have access to the actual window that displays the popover, but the same was true for NSDrawer.

    At first I didn't understand why NSPopover wasn't itself a subclass of NSViewController, but it makes sense that you might want to use NSPopover to display pieces of your interface that can appear both within the popover and in other places—like torn off in a floating window. Then the architecture of NSPopover starts to make mote sense.

    --Kyle Sluder
  • Thanks, but the accessibility-dev is by itself arcane, to say nothing of Accessibility engineers.. :)

    I've been trying to get useful info there for many issues I had in the past, to no avail. I was hoping to have at least the non-accessibility issues helped here.

    does anybody know how to regain focus on an NSPopover after it lost user focus? (after another window becomes key and main) I could not do it. The only way I found was to close/delete the NSPopover and recreate it. Seems bad solution to me.

    On 9 במאי 2012, at 18:38, Fritz Anderson wrote:

    > On 9 May 2012, at 7:16 AM, Motti Shneor wrote:
    >
    >> I am experiencing grave problems setting up decent accessibility on my NSPopover. Most issues affect VoiceOver users, but some affect all users (not even accessibility).
    >
    > Accessibility can be arcane (and buggy). Your best bet is the accessibility-dev list. An accessibility engineer follows it fairly closely.
    >
    > — F
    >

    Motti Shneor, Mac OS X Software Architect & Team Leader
    Spectrum Reflections Ltd.
  • On May 10, 2012, at 2:06 AM, Motti Shneor wrote:

    > does anybody know how to regain focus on an NSPopover after it lost user focus? (after another window becomes key and main) I could not do it. The only way I found was to close/delete the NSPopover and recreate it. Seems bad solution to me.

    Just a guess here, but what happens if you call -[NSWindow makeFirstResponder:] on the window containing the view to which the popover is attached, passing one of the NSResponders from your popover as the argument?

    Although NSPopover has its own hidden window, it seems to hide some fairly intimate connections to its host window.

    Cheers,

    Curt
    -----------------------------------------------------------------------------
    Curt Clifton, PhD
    Software Engineer
    The Omni Group
    www.curtclifton.net
  • Thanks Curt, of course I tried that.  it is hard to tell when exactly nspopover creates and manipulates its opaque window.

    The real problem is, this call can only (hopefully) set the first responder of the popover. It can't make the whole popover active. For that you'd need something like makeKeyAndOrderFront which doesn't work either.

    Motti shneor
    Senior software engineer & Team leader
    Spectrum Reflections Ltd.
    Sent from my iPhone

    ב-11 במאי 2012, בשעה 19:22, Curt Clifton <curt.clifton...> כתב/ה:

    > On May 10, 2012, at 2:06 AM, Motti Shneor wrote:
    >
    >> does anybody know how to regain focus on an NSPopover after it lost user focus? (after another window becomes key and main) I could not do it. The only way I found was to close/delete the NSPopover and recreate it. Seems bad solution to me.
    >
    > Just a guess here, but what happens if you call -[NSWindow makeFirstResponder:] on the window containing the view to which the popover is attached, passing one of the NSResponders from your popover as the argument?
    >
    > Although NSPopover has its own hidden window, it seems to hide some fairly intimate connections to its host window.
    >
    > Cheers,
    >
    > Curt
    > -----------------------------------------------------------------------------
    > Curt Clifton, PhD
    > Software Engineer
    > The Omni Group
    > www.curtclifton.net
    >
previous month may 2012 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today