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: .visually-hidden (VoiceOver on macOS) #380

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

ppvg
Copy link
Member

@ppvg ppvg commented Sep 18, 2023

This is an attempt at addressing an issue with .visually-hidden, using VoiceOver (Safari 16.6, macOS 13.5).

The width: 0, height: 0, max-width: 0 and max-height: 0 cause VoiceOver not to read .visually-hidden elements in some contexts, including table <caption>s.

Omitting the max-width and max-height and setting width and height to 1px seems to address this issue without anything becoming visible.

This requires further testing.

@ppvg
Copy link
Member Author

ppvg commented Sep 27, 2023

I've done some additional testing.

The issue can be reproduced with freshly reset VoiceOver settings on macOS (13.6) with Safari (16.6).

This fix resolves the issue on VoiceOver macOS Safari, without negatively affecting how the caption is read by VoiceOver macOS in Firefox (117) or Chrome (117), or by Talkback on Android (13) with Firefox (118) or Chrome (117).

I also haven't found a visual regression in any of the previously mentioned browsers.

As such I'm happy to have this PR reviewed & merged. More testing is of course welcome.

@ppvg ppvg marked this pull request as ready for review September 27, 2023 09:14
@ppvg ppvg requested review from TwistMeister and a team as code owners September 27, 2023 09:14
@HeleenSG HeleenSG merged commit 53e0949 into main Oct 3, 2023
4 of 6 checks passed
@ppvg ppvg deleted the fix/visually-hidden-voiceover-macos branch January 22, 2024 08:31
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.

2 participants