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

[a11y] Search: Search Icon Label Logic Update #13648

Merged
merged 9 commits into from
May 12, 2023
Merged

[a11y] Search: Search Icon Label Logic Update #13648

merged 9 commits into from
May 12, 2023

Conversation

sjbeatle
Copy link
Contributor

@sjbeatle sjbeatle commented Apr 24, 2023

With the current implementation, an accessibility violation occurs when the Search Icon's container doesn't have a role. The current implementation removes the role attribute when the onExpand property is undefined, but it should also remove the aria-labelledby.

This update will avoid the accessibility violation: https://www.w3.org/TR/wai-aria-1.1/#roles

Testing / Reviewing

The error can be see in the @carbon/react Storybook UI. Visit the Search component and click on the 'Accessibility' tab

Thanks!

With the currently implementation, an accessibility violation occurs when the Search Icon's container doesn't have a role.
The current implementation removes the `role` attribute when the `onExpand` property is undefined, but it should also remove the `aria-labelledby`.

This update will avoid the accessibility violation: https://www.w3.org/TR/wai-aria-1.1/#roles

---

The error can be see in the `@carbon/react` Storybook UI. Visit the [Search component](https://react.carbondesignsystem.com/?path=/story/components-search--default) and click on the 'Accessibility' tab
@sjbeatle sjbeatle requested a review from a team as a code owner April 24, 2023 01:24
@github-actions
Copy link
Contributor

github-actions bot commented Apr 24, 2023

DCO Assistant Lite bot All contributors have signed the DCO.

@netlify
Copy link

netlify bot commented Apr 24, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit d8da056
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/645d7ca580057600083f6a41
😎 Deploy Preview https://deploy-preview-13648--carbon-components-react.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.

@netlify
Copy link

netlify bot commented Apr 24, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d8da056
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/645d7ca52055f500080d3c58
😎 Deploy Preview https://deploy-preview-13648--carbon-elements.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.

@sjbeatle
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@sjbeatle
Copy link
Contributor Author

recheck

Copy link
Collaborator

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

Confirmed no longer see this violation:
image

@sjbeatle looks like some tests are failing other than that LGTM!

Copy link
Contributor

@guidari guidari 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 also. Let's fix the tests and it will be ready to merge.

Thank you

@sjbeatle
Copy link
Contributor Author

Looks good to me also. Let's fix the tests and it will be ready to merge.

Thank you

Great! I'll work on that right away. Thanks for the speedy response! 😁

@sjbeatle
Copy link
Contributor Author

@guidari @francinelucca
Thank you for your patience, and sorry for the delay!

I think this one should be all set, now. Please let me know if there's anything else you'd like me to address.

Cheers!

@andreancardona
Copy link
Contributor

@sjbeatle Hey Steven just waiting on a small fix on your end and we can get this in :)

@sjbeatle
Copy link
Contributor Author

@sjbeatle Hey Steven just waiting on a small fix on your end and we can get this in :)

Hello @andreancardona!

Thank you, but I'm not confident that the fix is trivial. Please see my recent comment here.

Thank you.

@kodiakhq kodiakhq bot merged commit 63750db into carbon-design-system:main May 12, 2023
SunnyJohal pushed a commit to SunnyJohal/carbon that referenced this pull request May 23, 2023
…3648)

* [a11y] Search: Search Icon Label Logic Update

With the currently implementation, an accessibility violation occurs when the Search Icon's container doesn't have a role.
The current implementation removes the `role` attribute when the `onExpand` property is undefined, but it should also remove the `aria-labelledby`.

This update will avoid the accessibility violation: https://www.w3.org/TR/wai-aria-1.1/#roles

---

The error can be see in the `@carbon/react` Storybook UI. Visit the [Search component](https://react.carbondesignsystem.com/?path=/story/components-search--default) and click on the 'Accessibility' tab

* fix(tests): snapshots updated after Search a11y update

---------

Co-authored-by: Francine Lucca <40550942+francinelucca@users.noreply.github.com>
Co-authored-by: Alison Joseph <alison.joseph@us.ibm.com>
Co-authored-by: Andrea N. Cardona <cardona.n.andrea@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants