Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
Test Plan
When the enter key was pressed with the theme change button selected, screen reader reads it five times.
There were two reasons for this problem.
First, the button tag had both title and aria-label.
Because the aria live region responds to either text content or aria-label changes, it will respond twice more if both are present.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-relevant
Second, aria-live="polite".
Before fixed
https://user-images.githubusercontent.com/19148682/213901656-ad523fc9-8352-4569-b282-2e31593b348e.mp4
Move title to outter div
https://user-images.githubusercontent.com/19148682/213901679-511f025d-c36e-438f-84f3-71459a93b48f.mp4
Remove aria-live="polite"
https://user-images.githubusercontent.com/19148682/213901697-171e8db5-1167-4cbc-9b66-bb0cda08b6af.mp4
Test links
https://deploy-preview-8569--docusaurus-2.netlify.app/
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
#7667