You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tool reports on every ribbon button the following issue:
It appears that the root cause is the implementation of the TwoLineLabel.cs:
If the button text has enough space to be on one line the tool will report an error. If there are two lines everything is fine.
I tried the following in the TwoLineLabel.cs (but this didn't solve all issues, because there are some other code paths) and it "worked":
private void UpdateTextRun()
{
...
if (string.IsNullOrWhiteSpace(this.textRun2.Text))
{
this.textRun2.Visibility = Visibility.Hidden;
// this didn't did the trick:
//this.textRun2.SetValue(AutomationProperties.IsOffscreenBehaviorProperty, IsOffscreenBehavior.Offscreen);
}
}
}
When I set the textRun2 to "hidden" it seems to be "better"
Be aware: I'm not an expert in this area. The accessibility tool gives some good hints, but I'm not sure how important those things are.
If you are interested and need help I could try to make a PR. Maybe you could give me a hint if this "code behind" stuff is OK for you or if I should try to put this in the style or somewhere else.
Environment
Fluent.Ribbon v7.1.0
Windows 10 (v 1903)
.NET Framework 472 & .NET Core 3
The text was updated successfully, but these errors were encountered:
Hiding the second run wouldn't really solve the issue for screen readers. The root cause should be that the control does not provide a proper automation peer. I added quite a few new automation peers but overlooked this one. Will have a look and create a new automation peer.
I'm currently try to make our application as accessable as possible and stumbled upon this tool:
https://accessibilityinsights.io/
The tool reports on every ribbon button the following issue:
It appears that the root cause is the implementation of the TwoLineLabel.cs:
If the button text has enough space to be on one line the tool will report an error. If there are two lines everything is fine.
I tried the following in the TwoLineLabel.cs (but this didn't solve all issues, because there are some other code paths) and it "worked":
When I set the textRun2 to "hidden" it seems to be "better"
Be aware: I'm not an expert in this area. The accessibility tool gives some good hints, but I'm not sure how important those things are.
If you are interested and need help I could try to make a PR. Maybe you could give me a hint if this "code behind" stuff is OK for you or if I should try to put this in the style or somewhere else.
Environment
The text was updated successfully, but these errors were encountered: