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

adding more pages to a11y testing #4435

Merged
merged 6 commits into from
Jan 29, 2021
Merged

Conversation

myasonik
Copy link
Contributor

@myasonik myasonik commented Jan 20, 2021

Summary

  1. Enable 5 more docs pages for automatic a11y testing: Button, TreeView, SideNav, CSS Utility Classes, Focus Traps

    • Required source changes to TreeView: Build unique IDs across and throughout component renders
    • Required source changes to Tabs: A tablist with no children no longer renders an empty tablist (an aria violation) (ideally, it would confirm that children are a Tab but one step at a time)
  2. Update axe-core (one minor, 2 patches), axe-puppeteer (one minor), puppeteer (one minor, one patch)

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
  • [ ] Added documentation
  • [ ] Checked Code Sandbox works for the any docs examples
  • Added or updated jest 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

@kibanamachine
Copy link

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

@chandlerprall chandlerprall self-requested a review January 26, 2021 17:16
Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Couple small items

CHANGELOG.md Outdated Show resolved Hide resolved
src/components/tree_view/tree_view.tsx Outdated Show resolved Hide resolved
src/components/tree_view/tree_view.tsx Outdated Show resolved Hide resolved
@@ -153,7 +152,7 @@ exports[`EuiTreeView is rendered 1`] = `
</span>
</button>
<div
id="euiNestedTreeView-euiTreeView_generated-id"
id="euiNestedTreeView-euiTreeView_generated-id--euiTreeView_generated-id"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this outcome is what you were expecting? That's a really long id that seems to duplicate the same string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, this is the expected outcome in the test.

It's so long because the component setup this pattern of a semi-understandable id throughout its use. So by knowing just the parent id, you can construct a child id (to some degree).

I could make the id shorter and the code simpler if we got rid of this and just used purely random ids but I'm not sure if that'll break something for someone at this point so I kept with the same system as this component had before (even though I had to change it slightly because there were duplicate id issues).

src/components/tabs/tabs.tsx Outdated Show resolved Hide resolved
src-docs/src/views/button/button_ghost.js Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@kibanamachine
Copy link

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

Copy link
Contributor

@cchaos cchaos 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 from my side, but I'll want @chandlerprall to look at the lifecycle stuff.

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Verified intended changes are reflected by snapshots

@kibanamachine
Copy link

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

@myasonik myasonik merged commit f5a2559 into elastic:master Jan 29, 2021
@myasonik myasonik deleted the a11y-polish branch January 29, 2021 19:19
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.

4 participants