Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NSAccessibilitySharedFocusElementsAttribute in OakChooser #1234

Closed
wants to merge 1 commit into from

Commits on Jun 25, 2014

  1. Use NSAccessibilitySharedFocusElementsAttribute in OakChooser

    This new 10.10 API allows one to mark, for some UI element, a set of UI
    elements to track selection. VoiceOver (and other accessibility clients)
    will then track and announce selection (cursor) changes not only in the
    currently focused element, but also for all elements contained in its
    "shared focus elements" array. This is a perfect fit for search field
    with a table of results. In fact it is used for new 10.10 Spotlight -
    its search field's shared focus element is the table containing the results.
    
    As NSAccessibilitySharedFocusElementsAttribute is available only in the 10.10 SDK,
    so make a way to use its value with previous SDKs (with which TextMate
    is currently compiled).
    
    We also retain the kind-of-hacky solution for pre-10.10 OSes introduced in
    and instead use NSAccessibilitySharedFocusElementsAttribute.
    
    This code was tested in all 6 fields of a 3×2 matrix:
    * compiled with 10.8, 10.9 and 10.10 SDK
    * run on 10.9 and 10.10 (DP2)
    
    For user, this means more standard behavior (says the same "completion selected"
    thing as with Spotlight) and a bit more correctness (no extra space
    before beginning / after end of search field on braille display).
    
    For developer, this means once we stop supporting 10.9, we will be ready to
    drop a lot of code which, while serving us well to make the choosers more
    user friendly on pre-10.10, will no longer be needed.
    dusek committed Jun 25, 2014
    Copy the full SHA
    78b3d30 View commit details
    Browse the repository at this point in the history