-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix #2733 by changing the approach to announce repeated announce messages #2745
Conversation
….com/microsoft/roosterjs into u/bvalverde/fixFixAnnounceNotworking
if (textToAnnounce && core.lifecycle.announceContainer) { | ||
const { announceContainer } = core.lifecycle; | ||
if (textToAnnounce == announceContainer.textContent) { | ||
textToAnnounce += DOT_STRING; |
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.
is the dot never announced in any browser??
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, it is only used to make the text content different, in case the announcement string is equal to the current one.
If we do not add the dot, since the text content does not change the announcement is not done.
* Export DefaultSanitizers to be available in roosterjs-content-model-plugins package #2739 * Fix #2741 by changing Id selectors from `#{id}` to `[id="{id}"]` (#2742) * init * Fix build * fix selection * fix * fixes * remove console.log * fix test * Fix #2734 by Setting List Metadata `applyListStyleFromLevel: true` when toggling a list (#2743) * init * Tests * add missing file * crop alternative * Fix #2733 by changing the approach to announce repeated announce messages (#2745) * init * move string to constant * bump version --------- Co-authored-by: vhuseinova-msft <[email protected]> Co-authored-by: Bryan Valverde U <[email protected]> Co-authored-by: Julia Roldi (from Dev Box) <[email protected]> Co-authored-by: Julia Roldi <[email protected]>
Fix for #2733
Right now, if we are going to announce a string that was previously announced, we remove the announce container and add a new one. However this looks like it now working well. As the announcing is not done.
So we are changing the approach by adding an additional dot to the string at the end, so the string is different. Having a different text content in the announce container will make that the browser triggers an announcement to the Screen reader,
To repro:
Before:
No announcement done.
After:
Screen Reader Announce that the new list bullet is created.