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

[Alert]: Make the Alert itself aria-live to dedupe screen reader announcement #906

Closed
wants to merge 1 commit into from

Conversation

hchiam
Copy link

@hchiam hchiam commented Feb 7, 2022

This pull request fixes bug #394 in an existing package (Alert):

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 7, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 74c0329:

Sandbox Source
reach-ui-template Configuration

Copy link
Author

@hchiam hchiam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review.

@TimKolberger
Copy link
Contributor

I think this might solve #916, because it removes the usage of ReactDOM.render.

@chaance
Copy link
Member

chaance commented Jul 13, 2022

I think the better solution (for now) is to add aria-hidden to the visible container as suggested in #394. I think the reason it didn't work in your testing is because cloning the child component clones that property to the announcement node, which we obviously don't want. A little refactoring to ensure it's only added to the visible container should do the trick.

Removing the mirror effects and changing the alert so that each item is its own live region changes how the alerts are read. I'd prefer not to change that behavior since a lot of apps likely depend on it as-is.

I think this might solve #916, because it removes the usage of ReactDOM.render.

Yes, we will need to rethink this for React 18, but it doesn't resolve the issue for the rest of the lib.

@chaance chaance closed this Jul 13, 2022
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.

3 participants