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

Dashboard a11y tests #58122

Merged
merged 15 commits into from
Mar 2, 2020
Merged

Dashboard a11y tests #58122

merged 15 commits into from
Mar 2, 2020

Conversation

majagrubic
Copy link
Contributor

Summary

Continuation of: #57821

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@majagrubic majagrubic changed the title Dashboard a11y tes Dashboard a11y tests Feb 20, 2020
@majagrubic
Copy link
Contributor Author

There's still that one failure and adding main didn't help:
https://dequeuniversity.com/rules/axe/3.5/bypass?application=axeAPI

Other than that, this should be good to go.

aria-label={i18n.translate(
'kbn.discover.docTable.pager.toolbarPagerButtons.previousButtonAriaLabel',
{
defaultMessage: 'previous page button',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultMessage: 'previous page button',
defaultMessage: 'Previous page in table',

I'd suggest cutting the word "button" because the type of control will be communicated by the assistive tech.

And I wanted to clarify what "previous page" means because that could also mean it does something similar to a browser back button. "in table" is still kind of vague but this UI will be changing soon so I don't think we need to invest too much into it to make it perfect.

aria-label={i18n.translate(
'kbn.ddiscover.docTable.pager.toolbarPagerButtons.nextButtonAriaLabel',
{
defaultMessage: 'next page button',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultMessage: 'next page button',
defaultMessage: 'Next page in table',

Same as "previous page button" above

@@ -143,6 +156,7 @@ class ListControlUi extends PureComponent<ListControlUiProps, ListControlUiState
onChange={this.handleOnChange}
singleSelection={!this.props.multiselect}
data-test-subj={`listControlSelect${this.props.controlIndex}`}
inputRef={this.setTextInputRef}
Copy link
Contributor

Choose a reason for hiding this comment

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

So I'm not 100% sure where this is getting rendered so I wasn't able to test it but while poking around this pointed to a much larger issue (that I think this is covering up) of, why is so much of dashboard wrapped in a aria-hidden="true" and with a screen reader only warning saying it's not accessible?

This is concerning on several levels...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, (almost?) all visualizations have area-hidden=true attribute. Their DOM structure is usually just a bunch of divs and an svg. Input control visualization, however, has this inner input field, which was focusable before and the test was failing:
Screenshot 2020-02-21 at 14 07 08

Copy link
Contributor Author

@majagrubic majagrubic Feb 21, 2020

Choose a reason for hiding this comment

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

What do you mean that much of dashboard is wrapped in "area-hidden=true"? If the point here is that dashboard is basically useless when all the visualizations are hidden in accessibility mode, I completely agree. I think it doesn't make much sense to show the dashboard in the first place, but I kinda assumed you and Bhavya had already discussed that

Copy link
Contributor

Choose a reason for hiding this comment

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

I hadn't done an a11y deep dive into the Dashboard page before so this is the first that I'm seeing it... I guess it's too large to address in this PR though. I'll focus on helping you merge this so that we can get the tests merged and I'll take a note to revisit it later. Might ping you about it later depending on how investigation goes.

Copy link
Contributor

@myasonik myasonik left a comment

Choose a reason for hiding this comment

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

That's for looking into these!

test/accessibility/apps/dashboard.ts Outdated Show resolved Hide resolved
@majagrubic
Copy link
Contributor Author

Jenkins, test this

@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

1 similar comment
@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@myasonik
Copy link
Contributor

@majagrubic @bhavyarm Anything else on this or is it good to merge?

I think if this merges to master, it'll supersede #57821 but they have diverged a little. (Bhavya's committed cab78c9 since this branched off.)

@majagrubic majagrubic marked this pull request as ready for review February 27, 2020 19:27
@majagrubic majagrubic requested a review from a team February 27, 2020 19:27
@majagrubic majagrubic requested a review from a team as a code owner February 27, 2020 19:27
@majagrubic
Copy link
Contributor Author

I'm trying to get the tests to pass, but otherwise good to merge from my side

@majagrubic majagrubic added v7.7.0 v8.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 27, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@majagrubic majagrubic added release_note:skip Skip the PR/issue when compiling release notes Feature:Dashboard Dashboard related features labels Feb 27, 2020
@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

Code owner changes LGTM

@@ -92,6 +92,7 @@ export class ValidatedDualRange extends Component {
fullWidth={fullWidth}
value={this.state.value}
onChange={this._onChange}
focusable={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment above to make focusable again when #59039 is fixed

Maja Grubic and others added 2 commits March 2, 2020 15:02
…s/list_control.tsx

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>
@majagrubic
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@majagrubic majagrubic merged commit b7c8e3a into master Mar 2, 2020
@majagrubic majagrubic deleted the pr/57821 branch March 2, 2020 20:56
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 3, 2020
* master: (26 commits)
  [Endpoint] Alert Details Overview (elastic#58412)
  Service map language icons (elastic#58633)
  [SIEM] [Case] Comments to case view (elastic#58315)
  Remove appBasePath from docs + add mock for AppMountParameters (elastic#58775)
  [kbn/optimizer] fix ui/* url rewrites in dist (elastic#58627)
  Dashboard a11y tests (elastic#58122)
  Downgrade "setting up plugin" log to debug (elastic#58776)
  [CI] Pipeline refactoring (elastic#56447)
  [Advanced Settings] Fix a11y of unsaved indicator (elastic#58511)
  put params into short url instead of behind it (elastic#58846)
  show timepicker in timelion and tsvb (elastic#58857)
  improve graph missing workspace error message (elastic#58876)
  [Maps] direct Discover "visualize" to open Maps application (elastic#58549)
  Disallow duplicate percentiles (elastic#57444) (elastic#58299)
  removing references to visTypes uiExports (elastic#58337)
  [SIEM] Default the Timeline events filter to show All events (elastic#58953)
  [Remote clusters] Add indexManagement as required plugin (elastic#58915)
  [DOCS] Rework of main get started page (elastic#58260)
  [Endpoint] [Tests] fixes elastic#57946 flaky endpoint policy list test (elastic#58348)
  [Endpoint] add resolver middleware (elastic#58288)
  ...
dgieselaar pushed a commit to dgieselaar/kibana that referenced this pull request Mar 3, 2020
* adding comprehensive dashboard tests

* fixing delete and adding dima changes

* Fixing some of the a11y test failures

* Fixing i18n issue

* Extracting exit fullscreen logic in a separate function

* Fixing typo

* Upgrading axe

* Fixing failing jest tests

* Removing main tag as it was causing a test to fail

* Adding focusable=false to a range control as well

* Update test/accessibility/apps/dashboard.ts

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Fixing linting error

* Update src/legacy/core_plugins/input_control_vis/public/components/vis/list_control.tsx

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Add comments

Co-authored-by: Bhavya RM <bhavya@elastic.co>
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
majagrubic pushed a commit that referenced this pull request Mar 3, 2020
* adding comprehensive dashboard tests

* fixing delete and adding dima changes

* Fixing some of the a11y test failures

* Fixing i18n issue

* Extracting exit fullscreen logic in a separate function

* Fixing typo

* Upgrading axe

* Fixing failing jest tests

* Removing main tag as it was causing a test to fail

* Adding focusable=false to a range control as well

* Update test/accessibility/apps/dashboard.ts

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Fixing linting error

* Update src/legacy/core_plugins/input_control_vis/public/components/vis/list_control.tsx

Co-Authored-By: Michail Yasonik <michail.yasonik@elastic.co>

* Add comments

Co-authored-by: Bhavya RM <bhavya@elastic.co>
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Bhavya RM <bhavya@elastic.co>
Co-authored-by: Michail Yasonik <michail@yasonik.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@majagrubic majagrubic mentioned this pull request Mar 3, 2020
1 task
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 3, 2020
* master:
  Dashboard a11y tests (elastic#58122)
  Downgrade "setting up plugin" log to debug (elastic#58776)
  [CI] Pipeline refactoring (elastic#56447)
  [Advanced Settings] Fix a11y of unsaved indicator (elastic#58511)
  put params into short url instead of behind it (elastic#58846)
  show timepicker in timelion and tsvb (elastic#58857)
  improve graph missing workspace error message (elastic#58876)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants