Re: Position of "slide-in on hover" views and VoiceOver
Re: Position of "slide-in on hover" views and VoiceOver
- Subject: Re: Position of "slide-in on hover" views and VoiceOver
- From: Nick Kocharhook <email@hidden>
- Date: Mon, 14 Apr 2014 15:14:19 +0000
- Thread-topic: Position of "slide-in on hover" views and VoiceOver
Wanted to follow up on this. Hopefully it’s a case of me just missing something obvious!
Thank you for any thoughts about this case,
-Nick
On Apr 7, 2014, at 12:41 PM, Nick Kocharhook <email@hidden> wrote:
> I have a view (A) which has a header subview (B). The header has buttons and text fields in it, and A has been hidden from VO so that users don’t need to interact with it to see what’s inside.
>
> So far so good. But B also slides away after a delay when A is not being hovered by the mouse. Because the buttons inside B are first-level elements, this leads to the absurdity of buttons and text fields showing up in the window’s toolbar. This would not IN ITSELF be a problem, but that position also affects the order which the items appear in the window. So in some cases, VO will see the close button, the minimize button, one of the header’s buttons, and only THEN the zoom button.
>
> Here are the things I have tried to solve this problem:
>
> 1. First I tried using accessibilitySetOverrideValue for NSAccessibilityPositionAttribute in the view controller. I tried changing the origin of B, and yes I understand that Position is in screen coordinates. Unfortunately, this didn’t work: VO still shows the controls in the same place as they were before.
>
> 2. So then I thought maybe I needed to change each subview directly. They’re all NSControls, so I tried setting the attribute on the NSControls directly, and also each control's NSCell. This also didn’t work.
>
> 3. I then tried creating an NSView subclass for B and overriding NSAccessibilityPositionAttribute. This works, and I can return a value that’s +100pt from the value the superview would be passing back. The controls stop appearing in the toolbar. However, I’m still not getting the behavior I want because in order for -accessibilityAttributeValue: to be called, I need to return NO from -accessibilityIsIgnored. Of course, this means that B becomes visible to my VO users, and not just the items inside of B.
>
> 4. I also considered setting the alpha to 0 when B has finished its animation "into the toolbar" and moving it back to its old location, ready to be unhidden the next time the mouse hovers A. This is going to be a considerable hassle, and I’m sure there will be edge cases around the animation being interrupted, or A being hidden and shown again. I would really like to avoid this solution.
>
> So I’m kind of at a loss. I suppose I could subclass NSCell and use that special subclass for all 4 controls in this subview, but that sounds like tremendous overkill.
>
> Am I doing something wrong here? Any thoughts would be very much appreciated.
>
> Thank you,
> -Nick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden