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

[EuiAvatar] Adding conditionalrole attribute to EuiAvatar container DIV #5423

Merged
merged 3 commits into from
Nov 30, 2021
Merged

[EuiAvatar] Adding conditionalrole attribute to EuiAvatar container DIV #5423

merged 3 commits into from
Nov 30, 2021

Conversation

1Copenut
Copy link
Contributor

@1Copenut 1Copenut commented Nov 30, 2021

Summary

The EuiAvatar has an aria-label attribute that is throwing an error in the latest axe-core plugin and CLI rulesets. This PR adds a conditional role attribute that resolves to "img" or "presentation" if the isDisabled prop is passed. PR closes #5289 and closes #5288.

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • Checked Code Sandbox works for any docs examples
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@1Copenut 1Copenut marked this pull request as ready for review November 30, 2021 17:46
@1Copenut 1Copenut requested a review from elizabetdev November 30, 2021 17:48
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5423/

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

LGTM, and the new conditional logic is captured in the props > isDisabled unit test. 👍 Thanks for the great accessibility work as always Trevor!

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Constance <[email protected]>
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5423/

Copy link
Contributor

@breehall breehall left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thanks Trevor!

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5423/

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