-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2733 by changing the approach to announce repeated announce mess…
…ages (#2745) * init * move string to constant
- Loading branch information
1 parent
addd332
commit 1bf1e77
Showing
5 changed files
with
76 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/roosterjs-content-model-core/lib/utils/createAriaLiveElement.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* @internal | ||
*/ | ||
export function createAriaLiveElement(document: Document): HTMLDivElement { | ||
const div = document.createElement('div'); | ||
|
||
div.style.clip = 'rect(0px, 0px, 0px, 0px)'; | ||
div.style.clipPath = 'inset(100%)'; | ||
div.style.height = '1px'; | ||
div.style.overflow = 'hidden'; | ||
div.style.position = 'absolute'; | ||
div.style.whiteSpace = 'nowrap'; | ||
div.style.width = '1px'; | ||
div.ariaLive = 'assertive'; | ||
|
||
document.body.appendChild(div); | ||
|
||
return div; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters