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: select a11y issues #4668

Closed
wants to merge 6 commits into from

Conversation

m4thieulavoie
Copy link
Collaborator

Pull Request

📖 Description

This PR addresses a few a11y issues that axe raised in an accessibility audit I did today. To give a bit of context, I went from 62 to 42 axe issues in the Select storybook page.

🎫 Issues

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

⏭ Next Steps

@chrisdholt chrisdholt requested a review from radium-v May 4, 2021 20:18
@m4thieulavoie m4thieulavoie changed the title applying package updates fix: select a11y issues May 4, 2021
class="control"
part="control"
role="button"
role="textbox"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Axe was looking for a child with the textbox role (as per the combobox spec)

Copy link
Member

Choose a reason for hiding this comment

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

Ah - @m4thieulavoie I think Axe is outdated. The combobox from ARIA 1.1 and 1.2 are significantly different. Should this be combobox rather than textbox? This doesn't fully support free input of text, so I'm not sure that textbox is accurate. Technically I think this is the select-only combobox: https://w3c.github.io/aria-practices/#examples-2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, let me check the axe version. However, the host already has the combobox role. So perhaps button was the right one here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@chrisdholt you were absolutely right. Axe has this opened issue to add support for the 1.2 combobox.
I'll close this PR as it seems to be a false alarm on our end!

Copy link
Member

Choose a reason for hiding this comment

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

All good! Once that AXE update is out, we'd love you to take another pass :)

aria-haspopup="listbox"
aria-labelledby="selected-value"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This DOM element was requiring a label (or aria-labelledby) in order to be a11y compliant

Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine, but we should run this via ARIA 1.2 rather than 1.1 as the implications are significant. Is there a way for you to validate against ARIA 1.2 in AXE instead of 1.1?

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