-
Notifications
You must be signed in to change notification settings - Fork 698
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
Update InfoBar narrator behavior #4578
Update InfoBar narrator behavior #4578
Conversation
<data name="InfoBarCloseButtonName" xml:space="preserve"> | ||
<value>Close</value> | ||
<comment>Automation name of the close button.</comment> | ||
<data name="InfoBarCloseButtonNameSeverityError" xml:space="preserve"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below: @gabbybilka feel free to suggest better text that should be used to announce the respective information, those were just a short text I used to plan and test things out.
@gabbybilka @YuliKl can you help define what should be announced ? "Close infobar error" sounds incorrect. Perhaps it could be where the first word matches the severity enum. |
Updated the wording for the close button now. |
<comment>The formatted string read by narrator when the InfoBar opens: "{Title} {Message}, {severity level}"</comment> | ||
</data> | ||
<data name="InfoBarSeverityErrorName" xml:space="preserve"> | ||
<value>severity error</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YuliKl, I think this should be "Info message, error severity" to give context that the InfoBar is a message before the content is read out. Notification could also work here?
Or just "Error InfoBar" to match the close button text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated wording now.
@@ -133,8 +145,40 @@ | |||
<value>InfoBar</value> | |||
<comment>This is the custom landmark used to denote an InfoBar to narrator.</comment> | |||
</data> | |||
<data name="InfoBarIconSeverityErrorName" xml:space="preserve"> | |||
<value>Icon severity error</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chingucoding Is it possible for the value to be the name of the icon if the icon is either the default or changed via resource from the default font set in generic.xaml?
It would be great if a user-provided icon set in IconSource had a name that we could set here as well.
@StephenLPeters has anything similar been done in other controls? Does Teaching Tip announce its icon?
@YuliKl I'm not sure of the value this announcement would provide with the current text considering the severity of the InfoBar will be announced when it opens. Maybe for when a user returns to the InfoBar after the initial announcement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, today, icon's are entirely ignored by narrator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabbybilka Current behavior, if you use the build in icons, we use our texts for UIA. If the user specify their own icon, they should be in charge of the UIA behavior of that (at least we are not interfering there to any degree).
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Should there be similar text for the action button? |
@chingucoding Sorry for the delayed response on this. We have been trying to reach out and get more information from accessibility experts on the correct approach for these issues. This is what we have finally landed on (which I think is simpler and gives a better accessibility experience). • Set AutomationProperty.IsDialog=”true” in the default style so that the InfoBar elements (Icon + Title + Message) are read when an action or close button is first focused. When focus leaves an InfoBar and returns, the InfoBar elements will be re-read. This is special behavior that Narrator has for elements with this property set to true which works pretty well for InfoBar. @gabbybilka and @johnpf74 as FYI. |
Also, to clarify a few points:
Thanks so much! |
I think the changes are implemented now @ranjeshj and @gabbybilka . The icon already was in the UIA tree. Regarding reanouncing the InfoBar, I am not sure how to implement or how to prevent consecutive changes to not overlap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding reanouncing the InfoBar, I am not sure how to implement or how to prevent consecutive changes to not overlap.
@StephenLPeters do you have any recommendations for how to implement this so that they don't overlap? Thanks both!
<data name="InfoBarIconSeverityWarningName" xml:space="preserve"> | ||
<value>Icon severity warning</value> | ||
<comment>Automation name used to announce the severity warning icon.</comment> | ||
</data> | ||
<data name="InfoBarOpenedNotification" xml:space="preserve"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing, this string is no longer read when the InfoBar is opened. @ranjeshj as FYI but I think that is fine and preferred as the string generated by setting isDialog to true is announced instead.
In case my test was faulty, can you update the InfoBarSeverity{Severity}Name values to be "{Severity} icon" for consistency with the icon names? 😊
<comment>Automation name used to announce the severity error icon.</comment> | ||
</data> | ||
<data name="InfoBarIconSeverityInformationalName" xml:space="preserve"> | ||
<value>Icon severity informational</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can each of these icon names be updated to "{Severity} icon"?
- "Informational icon"
- "Success icon"
- "Warning icon"
- "Error icon"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chingucoding before merging in, can you update these names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, of course. Not sure how I missed this. should be updated now.
One way might be to batch the changes and raise the automation event on an event that happens later, like say in a LayoutUpdated event and immediately unsubscribe from that LayoutUpdated event. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I don't really understand why the tests now fail with the changes made. All changes are in the UIA layer, none of them touch the Visual Tree from a rendering standpoint (only thing I can think of is a reference to elements on the visual tree). But I also don't really understand how the actual asserts in the failing test
or why they were designed the way they are. @teaP can you maybe help me out a bit here? |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Weird. The changes are purely accessibility related so I'm not sure why layout test is failing. @teaP @StephenLPeters any thoughts ? @chingucoding can you merge in master so we can be sure something is not stale ? Also, lets make the UpdateLayout part a separate PR. Thanks. |
Merged with master now @ranjeshj . Not sure what UpdateLayout part you are referring to here since all changes seem to be purely a11y wise, nothing related to the layout. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I looked at this but I don't know what's happening either. The test seems to be failing because the strings are no longer top-aligned, but I'm not sure how that could have changed... maybe it's because the UIA bounding box was affected somehow? |
Is the bounding box affected by that? I thought it was just a purely "visual" aspect of a control, not something related to the UIA tree. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@teaP @chingucoding can you take a look visually and see if there is a difference ? If not perhaps the test needs to be updated. |
I wasn't able to find a visual difference, master branch and this PR seemed pretty much the same with the changes done in the test. |
Yeah, same here. I'm trying to replace it with an API test that does the same thing now. |
In this end, it was pretty simply -- I realized the test was indexing into the UIA children of InfoBar, and this change added the icon as the first child, so all the indices were 1 off. :) |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Totally didn't think about this. Thank you so much for fixing the test @teaP ! |
Description
Now, the InfoBar will behave as follows:
Motivation and Context
Closes #4533 , closes #4534
How Has This Been Tested?
Tested manually.
Screenshots (if appropriate):