Skip to content

Conversation

gerardo-rodriguez
Copy link
Member

@gerardo-rodriguez gerardo-rodriguez commented Sep 9, 2022

Overview

This PR modifies the Calendar Date component in an attempt to create a better screen reader user experience.

Changes include:

  • added a "single-day event" visually hidden note fallback
  • refactor component markup to lessen the VoiceOver duplicate date announcment
  • enhance NVDA screen reader UX

Screenshots

No visual changes.

Testing

Before

Screenshot NVDA + Firefox VoiceOver + Safari
Screen Shot 2022-09-09 at 2 10 49 PM "SEP"
"9"
"SEP, September 9, 2022"
"9, September 9, 2022"
Screen Shot 2022-09-09 at 2 10 56 PM "SEP"
"9"
"3-day event"
"SEP, September 9, 2022"
"9, September 9, 2022"
"3-day event, September 9, 2022"

After

Screenshot NVDA + Firefox VoiceOver + Safari
Screen Shot 2022-09-09 at 2 10 49 PM "September 9, 2022"
"Single-day event"
"September 9, 2022, September 9, 2022"
"Single-day event"
Screen Shot 2022-09-09 at 2 10 56 PM "September 9, 2022"
"3-day event"
"September 9, 2022, September 9, 2022"
"3-day event"

Why is VoiceOver duplicating the date?

Because VoiceOver is silly. It's the only screen reader that exposes the datetime attribute. It probably shouldn't. The NVDA UX is much improved, while the VoiceOver UX is also better, even though it's slightly annoying that the datetime value is read, causing the date to be announced twice. Nothing we can do about that, and in my opinion, this solution finds a nice middle-ground where both NVDA and VoiceOver UX are better and acceptable, even though the VoiceOver UX is not perfect.

Previews

  1. Use VoiceOver and NVDA (if you have access to it) to test the screen reader UX

@changeset-bot
Copy link

changeset-bot bot commented Sep 9, 2022

🦋 Changeset detected

Latest commit: 94167f5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudfour/patterns Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Sep 9, 2022

Deploy Preview for cloudfour-patterns ready!

Name Link
🔨 Latest commit 94167f5
🔍 Latest deploy log https://app.netlify.com/sites/cloudfour-patterns/deploys/631bb10362004800086eb0e0
😎 Deploy Preview https://deploy-preview-2040--cloudfour-patterns.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@gerardo-rodriguez gerardo-rodriguez self-assigned this Sep 9, 2022
@gerardo-rodriguez gerardo-rodriguez marked this pull request as ready for review September 9, 2022 21:36
@gerardo-rodriguez gerardo-rodriguez requested review from a team September 9, 2022 21:36
@gerardo-rodriguez gerardo-rodriguez changed the title Feature/enhance calendar date Enhance Calendar Date screen reader UX Sep 9, 2022
Copy link
Member

@spaceninja spaceninja left a comment

Choose a reason for hiding this comment

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

Code looks good, and changes work as described. Nice job! :shipit:

@gerardo-rodriguez gerardo-rodriguez merged commit 5f8cbcd into main Sep 9, 2022
@gerardo-rodriguez gerardo-rodriguez deleted the feature/enhance-calendar-date branch September 9, 2022 23:38
@github-actions github-actions bot mentioned this pull request Sep 9, 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.

Enhance Calendar Date screen reader experience
2 participants