-
Notifications
You must be signed in to change notification settings - Fork 377
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
a11y: make SR read field descriptions on widgets #2281
Conversation
Replaces the IconButton in WidgetLabel.tsx with a plain Icon bearing an aria-label.
}} | ||
aria-labelledby={`${id}-description`} | ||
aria-label={ | ||
// append a semicolon so the screen-reader pauses instead of making a confusing run-on |
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.
🤩
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.
Neat trick.
Just failing a unit test. I'll fix that and get it back up. |
…soft/BotFramework-Composer into beyackle/srWidgetLabelIcon
It looks like this PR fixes another issue too (#2063), so I'll link that here too. |
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.
I'm a little confused by what you said in the description. Can a keyboard-only user still trigger the tooltip?
}} | ||
aria-labelledby={`${id}-description`} | ||
aria-label={ | ||
// append a semicolon so the screen-reader pauses instead of making a confusing run-on |
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.
Neat trick.
Okay, verified that these aren't keyboard-navigable now. I'll fix that quickly and put up another version. |
Add a keyboard tab stop and adjust spacing - still not sure the SR experience is 100% great, but this at least makes it work.
Still not 100% happy with the SR experience here, but I think this addresses all the issues. |
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.
A problem with this is that the focus styles might not match the other elements, so maybe the best approach is using the button.
The original ticket specifically complained about the SR reading "button" when there isn't anything to click on, so we can't leave it a button. |
Maybe the Fabric team has some guidance on this? I'll send you a link to their channel. |
* replace IconButton with Icon Replaces the IconButton in WidgetLabel.tsx with a plain Icon bearing an aria-label. * fix unit tests * Update WidgetLabel.tsx Add a keyboard tab stop and adjust spacing - still not sure the SR experience is 100% great, but this at least makes it work. Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Description
This replaces the IconButton in WidgetLabel.tsx with an ordinary Icon. The properties were copied over for the most part, except for some needed adjustment to the margins. One odd note here is that the screen reader's focus rectangle goes onto the editor field when reading the help text instead of the icon itself, but I think the behavior is basically correct as far as the SR experience goes.
Task Item
Closes #2115
Closes #2063
Screenshots