-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Support for suggestions in Windows 10 apps #6241
Comments
While this does seem odd (and I'd say it's a bug), valueChange is not really semantically correct here. You probably want textChange, but we don't currently listen for that. Have you tested this with AccEvent? If you do see a valueChange there for the first typed character, we should perhaps look at this, but if you don't, there's nothing for us to do. That said, if the reason for this is search suggestions, you shouldn't need to watch for either of these events anyway. Are you certain that the selected suggestion item doesn't fire an ElementSelected event? They're supposed to use the same pattern used in the Start Menu; see the code in appModules.searchui.SuggestionListItem. Note that you may need to restart NVDA due to the weird UIA event loss issues. |
Hi, Accevent does say Value Value event, and suggestions list (not the one found in Start menu) does not raise selection event. I did see text change event as well. |
After some discussion with @josephsl, I'm morphing this issue to cover suggestions in Windows 10 apps in general rather than dealing with the valueChange event, since I don't think the valueChange event is the best way to do this. We already support suggestions in the Start Menu search box. (Currently, this code is in the searchui app module.) However, suggestions are supported elsewhere in Windows 10; e.g. the search box in the Settings app. Microsoft have unified the accessibility support for these suggestions. We should support this everywhere, probably by implementing support in the base UIA object. Notes about the implementation:
|
Hi, Design specs:
Issues to consider:
PR and use case on its way. Thanks. |
…s 10. re nvaccess#6241 Windows 10 uses suggestions list for vairous things, including Start menu suggestions, Store recommendations, Settings app and others. Thus introduce NVDAObjects.UIA.SuggestionListItem, which derives its power from searchui.py version (searchui.py version is gone).
Hi, I'm thinking live region support should be a separate branch, but do agree that we need to keep an eye on controller for. For item 2, done as part of the pull request. For item 1:
The question becomes where to place this - in the base class or as an event handler for a search box. It may not be advisable to put this in behaviors, as we want to target Win10/UIA for now unless IAccessible has a similar method to controller for property event. Thanks. |
Controller For property is used by an element to let another element depend on values given by the source element, useful if suggestions should be listed for a search field among other possibilities. For now, Controller For property has been added to property to event names map in UIA Handler. A UIA object that handles this event (a search box) is next.
This reverts commit a3b1ce5.
Controller For property is used by an element to let another element depend on values given by the source element, useful if suggestions should be listed for a search field among other possibilities. For now, Controller For property has been added to property to event names map in UIA Handler. A UIA object that handles this event (a search box) is next.
… and announce appearance of suggestions. re nvaccess#6241 Coming from Windows 10 App Essentials add-on: a Search Field is now available that'll detect controller for property event and announce either 'suggestions' or 'suggestions closed' if suggestions appear or disappear, respectively. This takes care of both Start Menu and other fields in Windows 10 (works best in Anniversary Update and later).
Hi, Item 1 (handling Controller For property) done as part of latest commit. I'd like to gather opinions as to how appearance/disappearance of suggestions should be announced (I'm leaning towards providing a combo box in object presentation that'll let users hear this via a message, sounds or turn it off altogether). Thanks. |
…roller for object. re nvaccess#6241 Review from Mick Curran (NV Access): Do not waste a function call for fetching focused element. Besides, make sure to check if the focused control is the search field before proceeding to announce appearance of suggestions.
…s 10. re nvaccess#6241 Windows 10 uses suggestions list for vairous things, including Start menu suggestions, Store recommendations, Settings app and others. Thus introduce NVDAObjects.UIA.SuggestionListItem, which derives its power from searchui.py version (searchui.py version is gone).
Controller For property is used by an element to let another element depend on values given by the source element, useful if suggestions should be listed for a search field among other possibilities. For now, Controller For property has been added to property to event names map in UIA Handler. A UIA object that handles this event (a search box) is next.
This reverts commit a3b1ce5.
Controller For property is used by an element to let another element depend on values given by the source element, useful if suggestions should be listed for a search field among other possibilities. For now, Controller For property has been added to property to event names map in UIA Handler. A UIA object that handles this event (a search box) is next.
… and announce appearance of suggestions. re nvaccess#6241 Coming from Windows 10 App Essentials add-on: a Search Field is now available that'll detect controller for property event and announce either 'suggestions' or 'suggestions closed' if suggestions appear or disappear, respectively. This takes care of both Start Menu and other fields in Windows 10 (works best in Anniversary Update and later).
…roller for object. re nvaccess#6241 Review from Mick Curran (NV Access): Do not waste a function call for fetching focused element. Besides, make sure to check if the focused control is the search field before proceeding to announce appearance of suggestions.
…stions. re nvaccess#6241. Reviewed by Mick Curran (NV Access): announcement of search suggestion is something that NVDA should handle for other API's, such as suggestions in Firefox address bar, search suggestions in universal apps and so on. A new behavior named 'Suggestion' has been added that allows subclasses to provide custom routines when suggestions appear and disappear. This is handled by event_suggestionOpened and event_suggestionClosed, and by default NVDA will speak and braille this event.
…n to announce suggestion appearance. re nvaccess#6241. Reviewed by Mick Curran (NV Access): Based on the new Suggestion behavior mix-in, it is now possible for various objects to provide custom routines to let users know the appearance of suggestions. Thus UIA/Search Field is the first object to use this routine.
…suggestion list (parent). re nvaccess#6241. Reviewed by Mick Curran (NV Access): it is better to use raw UIA for obtaining parent element. However, one must be careful to catch COM and value errors (COM because the element might not be there, and value because NULL pointer access is logged). The raw UIA method was also recommended by Derek Riemer.
Hi, Last thing: should users be given a choice as to how they'd like to be informed about appearance of suggestions, to be categorized under Object Presentation dialog? If so, I'm considering using suggestions sounds recorded by @derekriemer if this is the case. Thanks. |
…ced in Windows 10 Start menu for consistency with earlier versions of Windows. re nvaccess#6241. iN Windows 10 Start menu, suggestions are announced automaticlaly, so no need to provide suggestion announcements.
…tions' so the behavior can be better described. re nvaccess#6241. If one inherits from 'Suggestion', the overall impression would be that the field is only going to display suggestions nad nothing else. Many suggestions are shown when text is entered, thus it is better to say 'EditableTextWithSuggestions' to better reflect what the behavior actually does. Also, a sound will be played to let users know the appearance of suggestions. (default vlaue).
…configure how auto-suggestions should be announced. re nvaccess#6241
…ss#6241. In the user guide, an explanatory text has been added to describe what auto-suggestions are.
Comments from Mick Curran and Jamie Teh (NV Access): no need for a separate message option when announcing appearance of auto-suggestions, as the sound cue will let the user of this fact. However, braille users should be notified of this regardless of this flag being turned on (deaf-blind users should be notified of this). User guide and settings dialog: changed the control type and label for auto-suggestions setting to reflect change in behavior.
…earch suggestions. re nvaccess#6241. Reviewed by Mick Curran (NV Access): allow Start menu search box and Edge's address omnibar to participate in providing auto-suggestions announcement.
@josephsl: could you please merge the NVDA branch called pr6241WithMiscDeps into this branch, thereby providing the suggestion sounds in miscDeps, and then I'll incubate this pr. |
Done, hopefully I did the right thing this time. Thanks.
From: Michael Curran [mailto:notifications@github.com]
Sent: Wednesday, May 10, 2017 11:34 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Support for suggestions in Windows 10 apps (#6241)
@josephsl <https://github.com/josephsl> : could you please merge the NVDA branch called pr6241WithMiscDeps into this branch, thereby providing the suggestion sounds in miscDeps, and then I'll incubate this pr.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#6241 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkD1ftw7_ielwZMfc7Ee_rgEMfqx0ks5r4qu8gaJpZM4JdeVr> .
|
Hi, An anoying issue found: in some cases, Start menu does not pop up and announced. If this happens, an UnboundLocalError exception is thrown in NVDAObjects.UIA.init line 758 (suggestions list checker). The solution (which is below) is to move the parentElement checker inside the try-except block where the parent element is fetched. Thanks. |
…lement fetcher fails. re nvaccess#6241. In some cases, when Start menu opens, it isn't announced by NVDA. As a result, parent element fetcher fails when trying to instantiate suggestions list item, with a traceback that ends with UnboundLocalError. Catch this by moving the SuggestionsListItem selector to inside of the try block.
Hi, The search field implementation isn't limited to a single line search fields: one way this is used is via at mentions in Mail app. STR:
Expected: NVDA may wish to play the suggestions sound. @michaelDCurran, any thoughts? Thanks. |
I only tried the suggestions in the start menu so far, but based on that I think this needs some more work for braille. There is a message "Suggestions" shown when the list is opened. This is very annoying, because you have to click on that or wait until it disappears to see what the suggestion is. Furthermore, you just see the text field with the first suggestion and you miss additional info like the type of suggestion (app/setting etc). Due to the cursor at the end of the edit field, you might have to scroll to read the first part of a suggestion. Since braille just displays the text field, I guess this also breaks if the first suggestion isn't selected automatically in other cases. After selecting a suggestion, the "Suggestions closed" message appears, I also think this is unnescesary. Usually my apps start faster than the message timout, so I have to click this away manually. If we improve braille, there are a few questions:
Probably @LeonarddeR and @dkager have input on this as well? |
Hi, I added those messages in braille to embrace deaf-blind users. In this case, it’d be best to have a discussion with @jcsteh. Thanks.
From: Bram Duvigneau [mailto:notifications@github.com]
Sent: Wednesday, May 31, 2017 1:07 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Support for suggestions in Windows 10 apps (#6241)
I only tried the suggestions in the start menu so far, but based on that I think this needs some more work for braille.
There is a message "Suggestions" shown when the list is opened. This is very annoying, because you have to click on that or wait until it disappears to see what the suggestion is. Furthermore, you just see the text field with the first suggestion and you miss additional info like the type of suggestion (app/setting etc). Due to the cursor at the end of the edit field, you might have to scroll to read the first part of a suggestion. Since braille just displays the text field, I guess this also breaks if the first suggestion isn't selected automatically in other cases.
After selecting a suggestion, the "Suggestions closed" message appears, I also think this is unnescesary. Usually my apps start faster than the message timout, so I have to click this away manually.
If we improve braille, there are a few questions:
* Do we show the suggestion, or also the user input as well? If so, how should we present that?
* Do we want to give an explicit message for opening/closing or should that be implicit? We don't have messages for other sounds such as browse/focus mode either.
Probably @LeonarddeR <https://github.com/leonardder> and @dkager <https://github.com/dkager> have input on this as well?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#6241 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkIL7pM4JJcykvdTSlSeEgyeZMy0-ks5r_R-7gaJpZM4JdeVr> .
|
I agree suggestions closed is probably unnecessary. However, the message for open may be important in cases where the suggestions open but the first is not selected automatically as in the Settings app. I think we should display selected suggestions as a timed message. That way, you see the suggestion but can still see the input after the message gets dismissed.
|
We do if you disable the sounds. I think that would be good UX for suggestions too, though that implies a setting to turn these sounds of similar to browse mode. Or maybe the two can be rolled into one. Then you'd have either sounds or messages but not both. |
Hi, I think it’d be best to work on a separate ticket for sounds/braille messages combo. But as for “suggestions closed”, I think it can be left out for now. Thanks.
From: Davy Kager [mailto:notifications@github.com]
Sent: Wednesday, May 31, 2017 2:09 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Support for suggestions in Windows 10 apps (#6241)
We don't have messages for other sounds such as browse/focus mode either.
We do if you disable the sounds. I think that would be good UX for suggestions too, though that implies a setting to turn these sounds of similar to browse mode. Or maybe the two can be rolled into one. Then you'd have either sounds or messages but not both.
Obviously the actual suggestions should be shown somehow regardless of sound.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#6241 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkCETOIPhjAEH8pMv-g0dzCVV-SQrks5r_S4qgaJpZM4JdeVr> .
|
…tions close for consistency with other situations (such as browse mode toggle). re nvaccess#6241.
…sh messages. re nvaccess#6241. Suggestion from Davy Kager: provide a way to let braille users read search suggestion items. This is done by emulating some parts of speech.SpeakObjectProperties except the name and position info map will be fetched (position info map fetching is contingent on whether report position info setting is enabled from Object Presentation dialog). Ideally, NVDA objects should have a way to fetch braille flash messages for controls. Also reworded docstring for SuggestionListItem so it cna include other UIA-based suggestion list items such as Windows 8.x search results.
Hi, A rough way to implement @dkager's suggestion is part of the latest commit. I put together a way to announce name and pos info for suggestion results in braille, which is then fed to braille.handler.message function so it can be shown as a flash message. Ideally, NVDA objects should have a method to return braille flash messages for controls such as for suggestion results. @jcsteh and @michaelDCurran, another round of review please. Thanks. |
…lle. re nvaccess#6241, nvaccess#6414. Instead of constructing the likely flash message, use a function used as part of Core issue 6414, which is much simpler than constructing the flash message from scratch.
…ontext menu as a suggestions list item. re nvaccess#6241. Oddly, the same behavior that's applied to suggestion items must work in Start suggestion's context menu, otherwise menu items will not be announced.
…s 10. re #6241 (#6274) * UIA handler: add proper copyright header (based on Git log archive) * UIA objects: introduce a global suggestion list item class for Windows 10. re #6241 Windows 10 uses suggestions list for vairious things, including Start menu suggestions, Store recommendations, Settings app and others. Thus introduce NVDAObjects.UIA.SuggestionListItem, which derives its power from searchui.py version (searchui.py version is gone). * SearchUI: remove unneeded imports * UIA: add support for Controller For property. re #6241 Controller For property is used by an element to let another element depend on values given by the source element, useful if suggestions should be listed for a search field among other possibilities. For now, Controller For property has been added to property to event names map in UIA Handler. A UIA object that handles this event (a search box) is next. * Revert "UIA: add support for Controller For property. re #6241" This reverts commit a3b1ce5. * UIA: add support for Controller For property. re #6241 Controller For property is used by an element to let another element depend on values given by the source element, useful if suggestions should be listed for a search field among other possibilities. For now, Controller For property has been added to property to event names map in UIA Handler. A UIA object that handles this event (a search box) is next. * NVDAObjects.UIA: introduce Search Field that'll handle controller for and announce appearance of suggestions. re #6241 Coming from Windows 10 App Essentials add-on: a Search Field is now available that'll detect controller for property event and announce either 'suggestions' or 'suggestions closed' if suggestions appear or disappear, respectively. This takes care of both Start Menu and other fields in Windows 10 (works best in Anniversary Update and later). * Search Field: check if search field is focused before asking for controller for object. re #6241 Review from Mick Curran (NV Access): Do not waste a function call for fetching focused element. Besides, make sure to check if the focused control is the search field before proceeding to announce appearance of suggestions. * Update copyright years, add a docstring to UIA objects (__init__). * Suggestion: a new behavior to allow NVDA to detect and announce suggestions. re #6241. Reviewed by Mick Curran (NV Access): announcement of search suggestion is something that NVDA should handle for other API's, such as suggestions in Firefox address bar, search suggestions in universal apps and so on. A new behavior named 'Suggestion' has been added that allows subclasses to provide custom routines when suggestions appear and disappear. This is handled by event_suggestionOpened and event_suggestionClosed, and by default NVDA will speak and braille this event. * UIA objects/Search field: use the new NVDAObjects.behaviors.Suggestion to announce suggestion appearance. re #6241. Reviewed by Mick Curran (NV Access): Based on the new Suggestion behavior mix-in, it is now possible for various objects to provide custom routines to let users know the appearance of suggestions. Thus UIA/Search Field is the first object to use this routine. * UIA objects/suggestions list: use raw UIA base tree walker to obtain suggestion list (parent). re #6241. Reviewed by Mick Curran (NV Access): it is better to use raw UIA for obtaining parent element. However, one must be careful to catch COM and value errors (COM because the element might not be there, and value because NULL pointer access is logged). The raw UIA method was also recommended by Derek Riemer. * UIA objects: updated comments, removed reference to Redstone. * UIA objects/Search field: don't allow suggestions detection be announced in Windows 10 Start menu for consistency with earlier versions of Windows. re #6241. iN Windows 10 Start menu, suggestions are announced automaticlaly, so no need to provide suggestion announcements. * NVDAObjects/behaviors: rename 'Suggestion' to 'EditableTextWithSuggestions' so the behavior can be better described. re #6241. If one inherits from 'Suggestion', the overall impression would be that the field is only going to display suggestions nad nothing else. Many suggestions are shown when text is entered, thus it is better to say 'EditableTextWithSuggestions' to better reflect what the behavior actually does. Also, a sound will be played to let users know the appearance of suggestions. (default vlaue). * Auto-suggestions: add a combo box in object presentation settings to configure how auto-suggestions should be announced. re #6241 * User guide: document auto-suggestions notification setting. re #6241. In the user guide, an explanatory text has been added to describe what auto-suggestions are. * Auto-suggestions: either play a sound or do nothing. re #6241. Comments from Mick Curran and Jamie Teh (NV Access): no need for a separate message option when announcing appearance of auto-suggestions, as the sound cue will let the user of this fact. However, braille users should be notified of this regardless of this flag being turned on (deaf-blind users should be notified of this). User guide and settings dialog: changed the control type and label for auto-suggestions setting to reflect change in behavior. * Search suggestions: allow Windows 10 Start menu and Edge to provide search suggestions. re #6241. Reviewed by Mick Curran (NV Access): allow Start menu search box and Edge's address omnibar to participate in providing auto-suggestions announcement. * Config: auto-suggestion setting is now part of configspec module. re #6241 * Update to miscDeps containing auto suggestions sounds. * NVDAObjects.UIA: catch UnboundLocalError for parentElement if parentElement fetcher fails. re #6241. In some cases, when Start menu opens, it isn't announced by NVDA. As a result, parent element fetcher fails when trying to instantiate suggestions list item, with a traceback that ends with UnboundLocalError. Catch this by moving the SuggestionsListItem selector to inside of the try block. * EditableTextWithSuggestions: remove braille message shown when suggestions close for consistency with other situations (such as browse mode toggle). re #6241. * NVDAObjects.UIA.SuggestionListItem: braille suggestion results as flash messages. re #6241. Suggestion from Davy Kager: provide a way to let braille users read search suggestion items. This is done by emulating some parts of speech.SpeakObjectProperties except the name and position info map will be fetched (position info map fetching is contingent on whether report position info setting is enabled from Object Presentation dialog). Ideally, NVDA objects should have a way to fetch braille flash messages for controls. Also reworded docstring for SuggestionListItem so it cna include other UIA-based suggestion list items such as Windows 8.x search results. * NVDAObjects.UIA.SuggestionsListItem: flash suggestion results in braille. re #6241, #6414. Instead of constructing the likely flash message, use a function used as part of Core issue 6414, which is much simpler than constructing the flash message from scratch. * UIA/SuggestionListItem/searchui: also classify Start search results context menu as a suggestions list item. re #6241. Oddly, the same behavior that's applied to suggestion items must work in Start suggestion's context menu, otherwise menu items will not be announced.
Fixed by pr #6274 |
Hi,
I ran into this issue while writing an app module for Windows 10's MSN Weather app (Microsoft.msn.weather.exe):
If you define a handler for value change (from UIA's value event) as part of an app module or an overlay class (such as search box in Weather app), the first char entered isn't handled correctly (it might be my end).
STR:
Expected: NVDA should run our custom handling routine for value change, such as locating controller for ID.
Actual: first char isn't handled correctly.
Test code path: in valueChange handler, I asked NVDA to print how many UI elements are affected by search term entry (this is what controller for ID is for). Execution ran thus:
So it seems valueChange is looking at the second to last char, not the end. This is an edit field with no auto-detection. The complete dev info is:
name: u'Search'
role: ROLE_EDITABLETEXT
states: STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: 1
Python object: <NVDAObjects.Dynamic_SearchBoxEditableTextWithoutAutoSelectDetectionUIA object at 0x04CF9170>
Python class mro: (<class 'NVDAObjects.Dynamic_SearchBoxEditableTextWithoutAutoSelectDetectionUIA'>, <class 'appModules.microsoft_msn_weather.SearchBox'>, <class 'NVDAObjects.behaviors.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.UIA.UIA'>, <class 'NVDAObjects.window.Window'>, <class 'editableText.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.NVDAObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: u''
location: (794, 36, 250, 40)
value: u''
appModule: <'microsoft_msn_weather' (appName u'microsoft_msn_weather', process ID 2472) at address 4c7c2b0>
appModule.productName: u'Weather'
appModule.productVersion: u'4.11.156.0'
TextInfo: <class 'NVDAObjects.UIA.UIATextInfo'>
windowHandle: 1640546
windowClassName: u'Windows.UI.Core.CoreWindow'
windowControlID: 0
windowStyle: 1409286144
windowThreadID: 5876
windowText: u'Weather'
displayText: u''
UIAElement: <POINTER(IUIAutomationElement) ptr=0x625f3a0 at 4f673a0>
UIA automationID: TextBox
UIA frameworkID: XAML
UIA runtimeID: (42, 1640546, 2, 32)
UIA providerDescription: [pid:2472,hwnd:0x0 Main(parent link):Unidentified Provider (unmanaged:Windows.UI.Xaml.dll)]
UIA className: TextBox
SearchBox is there because it's an overlay class.
Thanks.
The text was updated successfully, but these errors were encountered: