-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 read address aloud functionality [#7690] #7736
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ ethereum-org-website-dev deploy preview ready
|
@@ -229,7 +229,7 @@ const DepositContractPage = ({ | |||
// Create textToSpeechRequest | |||
let speech = new SpeechSynthesisUtterance() | |||
speech.lang = "en-US" | |||
speech.text = DEPOSIT_CONTRACT_ADDRESS.split("").join(" ") | |||
speech.text = DEPOSIT_CONTRACT_ADDRESS.split("").join(",") |
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.
Nice. One note: this rapidly decreases the speed at which this is read, maybe we increase speech.rate
to compensate?
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.
Thanks for the PR @nagabhiru, this solves the problem 🥳 Left one small comment about the reading speed that we could probably iron out.
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.
Thanks @nagabhiru, and thanks for explaining the solution. TIL :-)!
Woohoo, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2022 Ethereum.org Contributor: Head on over to GitPOAP.io and connect your GitHub account to mint! |
Fixed the read address aloud issue in #7690
Description
We were using the Web Speech API and setting the SpeechSynthesisUtterance.text to DEPOSIT_CONTRACT_ADDRESS.split("").join(" ")
When following a number the letter 'C' is read as 'degrees Celsius' and the letter 'F' as 'degrees Fahrenheit'.
I have added commas between the characters so that each character is read separately
Related Issue