Skip to content

adding more pages to a11y testing#4435

Merged
myasonik merged 6 commits intoelastic:masterfrom
myasonik:a11y-polish
Jan 29, 2021
Merged

adding more pages to a11y testing#4435
myasonik merged 6 commits intoelastic:masterfrom
myasonik:a11y-polish

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

</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).

@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