Skip to content

fix calendar accessibility issue #7437

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

Merged
merged 3 commits into from
Nov 26, 2024
Merged

Conversation

britt6612
Copy link
Collaborator

What does this PR do?

This PR adds a box around the daysoftheweek as well as styledweekscontainer

Since styledweekscontainer contains the role rowgroup when using the role rowgroup this needs to be wrapped within either a role grid table treegrid previously we had the role grid on the styledCalendar however with the role grid this can not contain more than one tabbable element so we needed to move it down after the previous and next buttons.

Where should the reviewer start?

calendar.js

What testing has been done on this PR?

locally

How should this be manually tested?

storybook in calendar for accessibility

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

Calendar has the following accessibility error: 'Ensure elements with an ARIA role that require parent roles are contained by them'
An element in Calendar has role="row" and doesn't have the correct parent role.

What are the relevant issues?

closes #7424

Screenshots (if appropriate)

Do the grommet docs need to be updated?

no

Should this PR be mentioned in the release notes?

no

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

backwards compatible

@jcfilben
Copy link
Collaborator

I'm seeing an unexpected snapshot change on the calendar/fill story

@britt6612
Copy link
Collaborator Author

I'm seeing an unexpected snapshot change on the calendar/fill story

we may have to think about this we can fix by adding fill to that box but not sure if there is a way around that since it wont fill the container without it

Copy link
Collaborator

@jcfilben jcfilben 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!

@britt6612 britt6612 requested a review from taysea November 22, 2024 19:44
Copy link
Collaborator

@MikeKingdom MikeKingdom 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!

@jcfilben jcfilben merged commit 1359fd4 into grommet:master Nov 26, 2024
12 of 14 checks passed
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.

Calendar - Ensure elements with an ARIA role that require parent roles are contained by them
3 participants