Repository navigation
Description
Description
Hi MS Edge Team,
I found the tool "Read Aloud" to fail when I use one of my custom components. What happens is that Read Aloud starts reading some text on the page, and then it reaches my custom component, and stops. Then the web page becomes unresponsive, until I finally get the alert box saying that the page is not responding and asking to wait or leave the page.
Also, sometimes it even does not read any text on the page and just freezes/stops working, making the page to be unresponsive as well.
I have attached a more decent HTML file that you can run on MS Edge to reproduce this error. Please follow these steps:
- Download the
read-aloud-vanilla-js-component.htmlfile - Open MS Edge
- Open the file using MS Edge
- Now Open Read Aloud (CTRL + SHIFT + U) - it will start reading automatically
Expected behavior
Read Aloud reads the whole page's text and then stops
Actual behavior:
Read Aloud reads the first part of the text (not always this happens - sometimes it just freezes). Reaches the component and It stops reading and the page becomes unresponsive. Sometimes It takes a lot of time (and I mean it) to finish reading the page. In summary, its behavior is very unpredictable.
Notes
I have some points I would like to mention, because I think this will help you to understand better and therefore, fix this issue faster.
First, the custom element (CE) has 2 named slots in an specific order. When the issue happens, I have my CE with 2 nested children that are using those named slots, but not necessarily on the same order as they are within the shadow DOM definition of the CE.
So for instance if my CE has 2 slots defined as:
<slot name="slot-1"></slot>
<slot name="slot-2"></slot>and I use the CE as follows:
<!-- Notice that the first child is using slot-2 and the second is using slot-1 -->
<custom-container><span slot="slot-2">This text in slot 2.</span><span slot="slot-1">This is text in slot 1.</span></custom-container>Read Aloud will fail. This is the same example you will find on the attached html file: read-aloud-vanilla-js-component.html
I am more than happy to collaborate in case you need more specific details of this issue.
Activity