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 ARIA violation: add innerElementRole property #631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jussirantala
Copy link

@jussirantala jussirantala commented Mar 21, 2022

innerElementRole property added for the user to be able to set role. Without this it is not possible to pass ARIA violation checks. For example you could set innerElementRole to "rowgroup" and role for each list item to "row" and the screen reader would understand that this is list.

@jussirantala jussirantala marked this pull request as ready for review March 21, 2022 17:09
@jussirantala jussirantala changed the title Add innerElementRole property Mar 21, 2022
@Terence-Cheng
Copy link

I also had this problem, but I solve it with innerElementType like below.

        <List
            innerElementType={(innerProps) => (
                <div
                    {...innerProps}
                    role="rowgroup"
                />
            )}

      ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants