read-aloud
read-aloud copied to clipboard
Selected text in iframe, reads from top of page
Selecting text in an iframe and pressing the play/pause keyboard shortcut: alt p
(default),
or clicking on the Read Aloud toolbar button.
Starts reading from the top of the page, just as it does without selected text.
Expected The selected text should be read.
Example
https://www.autohotkey.com/docs/Program.htm
Select some text, for example, triple-click to select the paragraph that starts with "Tip: If your browser supports it, ..."
Press the Read Aloud play/pause keyboard shortcut: alt p
(default)
Read aloud starts reading from the top of the page: "Using the Program AutoHotkey doesn't do anything on its own; ..."
The same thing happens after clicking on the Read Aloud toolbar icon, with a text selection (in an iframe).
What works
It works to right-click on selected text in an iframe and choose: "Read aloud selected text"
But it takes a lot more steps than just pressing the keyboard shortcut
- select text (in an iframe)
- move the mouse over the selected text
- right-click
- move the mouse to the entry "Read aloud selected text"
Depending on if the selected text is near the top or bottom of the browser, the right-click menu opens upwards or downwards.
And depending on how many browser extensions have entries in the right-click menu. If it opened downwards, then the mouse has to be moved past about 12 menu items. (tested in Edge) If the menu opened upwards, then the mouse has to be moved past about 2 items. (tested in Edge)
A possible solution
Maybe the play/pause keyboard shortcut and possibly the toolbar icon, could call the method in the right-click menu: "Read aloud selected text" when it detects selected text.
Read Aloud seems to already detect when there is selected text, because the right-click option "Read aloud selected text", only appears when there is selected text.
Notes
The following issue might be the same or related, but it only mentions "iframe" without any details: Read Aloud doesn't read iframe form https://github.com/ken107/read-aloud/issues/224
System
Read Aloud Version1.55.0 Edge 103.0.1264.37 (Official build) (64-bit) Windows 21H2