Skip to content

Conversation

@myasonik
Copy link
Contributor

@myasonik myasonik commented May 19, 2020

Summary

This PR does 2 things.

  1. Removes menu and menuitem roles from KeyPadMenu and KeyPadMenuItem.
    • These roles are super specific and shouldn't be used for generic lists of links. We also weren't implementing any of the expected keyboard functionality for them so they weren't technically complete either.
  2. Changes our a11y testing strategy from a whitelist of pages to test to a blacklist of pages to skip.
    • We weren't adding new pages that we were adding to the automated testing making it increasingly difficult to catch up. Switching to a blacklist means that new pages are automatically tested.
    • Added several new pages to the tests: Header, Key Pad Menu, Data Grid Focus, Comment List, Image, Tour, Filter Group, Beacon, Highlight and Mark, HTML ID Generator, Overlay Mask, Changelog (Making progress on [Meta][Docs] Add automated tests for all pages #2679)

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation 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

@myasonik myasonik added chore accessibility testing Issues or PRs that only affect tests - will not need changelog entries labels May 19, 2020
@kibanamachine
Copy link

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

@cchaos
Copy link
Contributor

cchaos commented May 20, 2020

The title of this PR could be more specific.

  1. Removes menu and menuitem roles from KeyPadMenu and KeyPadMenuItem.

I think this is fine and agree that it's not correct for all implementations. I think we should also then add some accessibility guidelines to their docs page around what to add if:
a. It's used as the primary navigation for the site/app
b. It's used in a menu-like dropdown with selection (there's a selected item)

  1. Changes our a11y testing strategy from a whitelist of pages to test to a blacklist of pages to skip.

🙏 Thank you! This makes way more sense and I'm definitely in the group of people who forget to add to this list.

@myasonik myasonik changed the title Adding tests Adding a11y tests and moving from whitelist to blacklist + misc fixes May 20, 2020
@myasonik
Copy link
Contributor Author

myasonik commented May 20, 2020

The title of this PR could be more specific.

😆 The title of the PR was terrible. My bad, it's better now.

we should also then add some accessibility guidelines

I added a note about what to do if it's a bunch of links but I couldn't think of any good broad guidelines that I could give about the buttons use case. Anything I could think of had plenty of exceptions so I just didn't mention it. I don't think anything should be super broken if they don't do anything but it could be if they do the wrong thing so I thought rather overly simplified is better than misleading.

@kibanamachine
Copy link

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

);

$button.simulate('click');
$button.find('button').simulate('click');
Copy link
Contributor

Choose a reason for hiding this comment

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

To make the test read more appropriately can you change the const name to $item instead of $button?

Copy link
Contributor

Choose a reason for hiding this comment

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

This also might break downstream app tests, do we then consider this a breaking change @chandlerprall ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was reverted by moving the <li> wrapping element to the parent component

Copy link
Contributor

Choose a reason for hiding this comment

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

Somehow it still exists as changed?

Copy link
Contributor

Choose a reason for hiding this comment

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

@myasonik Can you remove this change, it shouldn't be necessary anymore.

Michail Yasonik and others added 2 commits May 27, 2020 16:06
@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

@myasonik myasonik requested a review from cchaos May 29, 2020 21:24
@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

@cchaos
Copy link
Contributor

cchaos commented Jun 3, 2020

Looks like there's another/new a11y issue:

16:51:29 Errors on tp://localhost:9999/#/layout/header
16:51:29 [landmark-unique]: Landmarks must have a unique role or role/label/title (i.e. accessible name) combination
16:51:29   Help: https://dequeuniversity.com/rules/axe/3.4/landmark-unique?application=axe-puppeteer
16:51:29   Elements:
16:51:29     - .euiHeaderSectionItem--borderLeft.euiHeaderSectionItem > .euiHeaderLinks[aria-label="App\ navigation"]
16:51:29     - .euiHeaderSectionItem--borderLeft.euiHeaderSectionItem > .euiHeaderLinks[aria-label="App\ navigation"] > .euiHeaderLinks__list[role="navigation"]
16:58:54 1 accessibility errors

Probably my bad...

@kibanamachine
Copy link

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

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.

Thanks! LGTM!

@cchaos cchaos merged commit a6e49f0 into elastic:master Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility chore testing Issues or PRs that only affect tests - will not need changelog entries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants