Hide tooltips from screen readers with aria-hidden #974
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.
Description of the Changes
Issue:
See Improve Screen Reader Users' Navigation Experience by Hiding Control Tooltips from Screen Readers #973
When using VoiceOver on controls using a playkit-js-ui tooltip, navigating through controls using VO-Left Arrow and VO-Right Arrow results in the VoiceOver cursor stopping on both the control button and also on the associated tooltip. This creates two issues:
Inefficient Navigation: Users must press navigation keys twice as many times to move through the controls since they need to navigate past both the button and its tooltip.
Potential User Confusion: When navigating quickly, users may be unsure whether they're focused on the actual control button or its tooltip, potentially leading to a confusing experience.
Here is a video demonstrating the issue:
Video: Improve VoiceOver Navigation Experience by Hiding Control Tooltips from Screen Readers (2:34)
Fix:
Add
aria-hidden="true"
to the tooltip component insrc/components/tooltip/tooltip.tsx
. This change:Sample video player with this fix applied: demo-with-aria-hidden-on-tooltip