0 Replies Latest reply on Dec 22, 2009 2:31 PM by GordonSmith

    [svn:fx-trunk] 13168: Changed how accessibility works in the Spark Panel and TitleWindow.

    GordonSmith Level 4

      Revision: 13168

      Revision: 13168

      Author:   gosmith@adobe.com

      Date:     2009-12-22 14:31:13 -0800 (Tue, 22 Dec 2009)

      Log Message:

      ***********

      Changed how accessibility works in the Spark Panel and TitleWindow.

       

      Previously, we were attaching the PanelAccImpl or TitleWindowAccImpl to the titleDisplay, which complicated things. The first complication was that the titleDisplay is a skin part that might not be there when initializeAccessibility() is called. The second complication was in trying to get the MSAA Location to be the size of the Panel or TitleWindow, not the size of the titleDisplay; this wasn't working properly due to timing issues, since the titleDisplay redraws after the Panel/TitleWindow.

       

      Now, we attach the acc impl to a special first child Sprite which stays behind all the content. The accessibility code in Panel and TitleWindow goes back to being completely standard; the creation and drawing of this Sprite (to get the MSAA Location correct) is handled in PanelAccImpl and inherited by TitleWindowAccImpl.

       

      To prevent the title from being spoken twice, I null out the titleDisplay's own accessibilityImplementation at initialization or when the titelDisplay is added as a skin part. But I keep a reference to it in the component's acc impl so that I can restore it when the titleDisplay is removed as a skin part. For some reason, simply setting accessibilityEnabled to false didn't seem to work.

       

      I also changed the logic in TitleWindowAccImpl for dispatching the MSAA events EVENT_OBJECT_LOCATIONCHANGE and EVENT_OBJECT_DESTROY. Previously, EVENT_OBJECT_LOCATIONCHANGE was being sent in response to a MOUSE_UP from the titleDisplay (after a drag); now it is sent in response to a WINDOW_MOVE_END from the TitleWindow (after a drag). And, previously, EVENT_OBJECT_DESTROY was sent in response to a MOUSE_UP from the closeButton (after a click); now it is sent in response to a CLOSE from the TitleWindow.

       

      QE notes: None

      Doc notes: None

      Bugs: None

      Reviewer: Evtim

      Tests run: checkintests

      Is noteworthy for integration: No

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/PanelAccImpl.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TitleWindowAccImpl.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TitleWindow.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableCom ponent.as