Skip to content
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

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

nagabhiru
Copy link
Contributor

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

@vercel
Copy link

vercel bot commented Sep 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ethereum-org-website ❌ Failed (Inspect) Sep 7, 2022 at 5:48PM (UTC)

@gatsby-cloud
Copy link

gatsby-cloud bot commented Sep 7, 2022

✅ 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(",")
Copy link
Contributor

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?

Copy link
Contributor

@minimalsm minimalsm left a 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.

Copy link
Contributor

@minimalsm minimalsm left a 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 :-)!

src/pages/staking/deposit-contract.tsx Outdated Show resolved Hide resolved
@minimalsm minimalsm merged commit cdd812e into ethereum:dev Sep 8, 2022
@gitpoap-bot
Copy link

gitpoap-bot bot commented Sep 8, 2022

Woohoo, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2022 Ethereum.org Contributor:
GitPOAP: 2022 Ethereum.org Contributor GitPOAP Badge

Head on over to GitPOAP.io and connect your GitHub account to mint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants