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

Accessibility: The "Copy" control's copied state is not indicated programmatically when a user activates the control #2599

Open
arlina-espinoza opened this issue Oct 11, 2024 · 1 comment

Comments

@arlina-espinoza
Copy link

Describe the bug
The "Copy" control's copied state is not indicated programmatically when a user activates the control. While a status message appears with the text "Copied" to let sighted users know that the text has been copied, blind and low vision users will not know that the button was activated.

Expected behavior
When the "Copy" control is activated, its resulting message must be conveyed both visually and programmatically. To programmatically indicate the copied state, a live region should be used to announce the status message of "Copied" to screen reader users at the same time that it appears visually.

Code example (simplified)
<button>
<div class="sc-carFqZ hBWCUB">Copy
...
<div class="sc-iBzEeX glZmJR" role="status">Copied</div>
...
</div>
</button>

Note: To ensure that the message is announced reliably to screen reader users, this element must be present in the DOM when the page first loads but must be empty of any content. When the element is populated with content, it will be announced. Its content must only be announced once and keyboard focus must not be moved to the element.

Resources

Screenshots
Image

P.D.: Thanks for the great work on this project!

@arlina-espinoza
Copy link
Author

Additionally, after copying with the keyboard the focus goes to the start of the page, when it should stay on the "Copy" control that was activated by the user.

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

No branches or pull requests

1 participant