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

Don't apply role="gridcell" to blank days or role="row" to blank week #5474

Merged
merged 3 commits into from Jul 31, 2021

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Jul 27, 2021

What does this PR do?

Removes use of role="gridcell" on blank Calendar days and role="row" from weeks that are completely blank to improve experience of screen readers.

Removing "gridcell" on blank days ensures a screen reader user doesn't need to navigate over these days.

The removal of role="row" on blank weeks is needed for screen reader to properly calculate number of rows in a table. If not, a completely blank week will still be included in the row count but not accessible by screen reader which is confusing. For example "Row 1 of 6" where only 5 rows are able to be accessed because on week is empty.

Where should the reviewer start?

src/js/components/Calendar/Calendar.js

What testing has been done on this PR?

Tested with VoiceOver locally.

How should this be manually tested?

Test on showAdjacentDays story with VoiceOver and arrow keys. Should not be able to access blank days.

Any background context you want to provide?

What are the relevant issues?

Closes #5436

Screenshots (if appropriate)

Do the grommet docs need to be updated?

No.

Should this PR be mentioned in the release notes?

Yes. Improved behavior for screen reader users by removing blank days from navigable Calendar days.

Is this change backwards compatible or is it a breaking change?

Backwards compatible.

Copy link
Contributor

@amandadupell amandadupell left a comment

Choose a reason for hiding this comment

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

looks good to me!!

Copy link
Collaborator

@halocline halocline left a comment

Choose a reason for hiding this comment

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

Functionality is very nice.

Minor suggestion regarding placement of code comments. Soft opinion.

src/js/components/Calendar/Calendar.js Outdated Show resolved Hide resolved
src/js/components/Calendar/Calendar.js Show resolved Hide resolved
@ericsoderberghp ericsoderberghp merged commit b81ccf7 into grommet:master Jul 31, 2021
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.

Fix Calendar Accessibility with Blank Dates
4 participants