NVDAObjects.IAccessible: output alerts in braille#14565
Conversation
When processing MSAA alert event, only speech output was invoked whereas other implementations such as notification behavior class also brailled alerts and notifications. Therefore add braille output to alert event handler, both for the root alert and its children, borrowing heavily from notification behavior.
|
Hi, I think this might be a good opportunity to introduce a generic alert event to base NVDA object or the notification behavior (perhaps in 2023.x or 2024.1) unless alert event is specific to IAccessible and/or UIA. Among other things, the default implementation would allow vision enhancement providers to offer a way to look at where the alert is coming from. @Qchristensen, could you mind directing the user who reported the original issue to the issue you created and this PR? Or, if you want, do CC me in the converation you are having with the user. Thanks. |
| if self in api.getFocusAncestors(): | ||
| return | ||
| speech.speakObject(self, reason=controlTypes.OutputReason.FOCUS, priority=speech.Spri.NOW) | ||
| # Ideally, we wouldn't use getPropertiesBraille directly. |
There was a problem hiding this comment.
what would be better? why not do that? it would be good to include this in the comment.
There was a problem hiding this comment.
it appears that using this directly is common practice, I think this comment can be droppped
|
Hi, note that this was copied from behaviors - @michaelDCurran, do you remember the reason for this? Thanks.
|
Would you be interested in doing this in this PR? |
|
Hi, not in this PR as this addresses a specific alert case (UIA is handled through system alert event); I think I’m seeing a mentoring opportunity for someone. Thanks for the suggestion (will think about it in northern summer once spring classes are done).
|
Suggestion from Sean Budd (NV Access): since braille.handler.message comment is found in other places and the actual method is used elsewhere, remove the message comment.
See test results for failed build of commit 4e57d3f244 |
Link to issue number:
Fixes #14562
Summary of the issue:
Alert event text is not shown on braille displays when the event occurs such as when downloading files via Google Chrome.
Description of user facing changes
NVDA will present alert messages in braille.
Description of development approach
Add braille output (braille.handler.message) to NVDAObjects.IAccessible.IAccessible.event_alert, borrowing heavily from notification behavior.
Testing strategy:
Manual testing:
Before the PR: speech output only when alert event is fired.
After the PR: speech and braille outpu ocurs.
Known issues with pull request:
While Chrom's file download alert provides a good test case for testing braille output for alert event,s it might be possible that apps and web elements may not fire alert events, or if they do, presented in a way that NVDA doesn't know about (alert events are handled if the control role is alert).
Change log entries:
Bug fixes:
In web browsers such as Chrome and Firefox, alerts such as file downloads via Chrome are shown in braille in addition to being spoken. (#14562)
Code Review Checklist: