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

[Graph] Fix various a11y issues #54097

Merged
merged 18 commits into from
Jan 13, 2020
Merged

[Graph] Fix various a11y issues #54097

merged 18 commits into from
Jan 13, 2020

Conversation

flash1293
Copy link
Contributor

Summary

Fixes #48488

This PR addresses some a11y issues in Graph:

  • Empty listing
    • No h1 heading - changed the prompt to create a new Graph from h2 to h1
  • Filled listing
    • Empty table header (has to be fixed i table list view) - not actually an error - there is no text in the th itself, but the checkbox in there has a label. If this is a problem, it has to be fixed in eui.
  • Workspace
    • No heading structure (only on filled workspace, on empty workspace guidance panel takes over this role) - added a screenreader visible h1 on filled workspace
  • Other a11y problems that can be fixed in the same batch
    • Empty buttons in side bar (no accessible label) - added tooltip as aria-label as well
    • Low contrast issue in the side bar - tinted the color a little

@flash1293 flash1293 added Feature:Graph Graph application feature v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.6.0 labels Jan 7, 2020
@flash1293 flash1293 mentioned this pull request Jan 7, 2020
31 tasks
@flash1293
Copy link
Contributor Author

Jenkins, test this. Not sure whether unrelated or not.

@flash1293 flash1293 marked this pull request as ready for review January 7, 2020 16:09
@flash1293 flash1293 requested a review from a team January 7, 2020 16:09
@flash1293 flash1293 requested a review from a team as a code owner January 7, 2020 16:09
@flash1293 flash1293 added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Jan 7, 2020
@elasticmachine
Copy link
Contributor

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

@flash1293 flash1293 requested a review from barlowm January 7, 2020 16:09
@elizabetdev elizabetdev self-requested a review January 7, 2020 16:19
@myasonik
Copy link
Contributor

myasonik commented Jan 7, 2020

Saw a few more low hanging fruit for a11y fixes here. If you have a chance, could you add these fixes in as well? (If anything's not clear, feel free to reach out! Happy to zoom!)

  • Can you add aria-descrbiedby={idOfTheH1} to the main on the graph empty page? (EuiPageBody renders as a main and you should be able to pass that prop in...)
  • When going through the steps to add a graph, can the contents of the page be put inside a main tag? (#graphBasic might be a good option to turn into a main which I'm guessing you'll have control over given its id and should also solve the problem for the workspace in general...) (And, same as item above, can you add aria-describedby the same way to it as well?)
    • Should also work for the workspace's h1
  • Can ul.gphGuidancePanel__list be changed to an <ol>? Also on this element, can you add aria-describedby={idOfTheH1}?
  • For each li.gphGuidancePanel__item, could you add aria-current="step" to the current one that should be dealt with?
  • Adding display: contents onto buttons (i.e., .gphGuidancePanel__item button) unfortunately ruins their semantics and so several of their interactions (like focus stats and tabbing). Toggling it off in the inspector I don't see any changes without the property so I'm hoping we can just remove it?
  • You kill pointer events on buttons for disabled items but I'm still able to activate the button using a screen reader. Could you add disabled={true} to any buttons that are inside disabled list items?

@flash1293 flash1293 requested a review from a team as a code owner January 8, 2020 08:52
@flash1293
Copy link
Contributor Author

flash1293 commented Jan 8, 2020

Hi @myasonik ,

thanks for this!

I went through your points and I think I addressed all of them.

Adding display: contents onto buttons (i.e., .gphGuidancePanel__item button) unfortunately ruins their semantics and so several of their interactions (like focus stats and tabbing). Toggling it off in the inspector I don't see any changes without the property so I'm hoping we can just remove it?

This was originally added to have the button text wrap like ordinary text, but with the current labels it's not necessary anymore because the clickable texts are pretty short. I removed it for now.

@@ -67,6 +67,8 @@ export interface TableListViewProps {
tableListTitle: string;
toastNotifications: ToastsStart;
uiSettings: IUiSettingsClient;
ariaDescribedby?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

TableListView already takes in quite a few textual inputs (entityName, entityNamePlural, tableListTitle).
Could those be used for this?

If the fact they are translated is an issue, I would still pass in a single input, instead of the two added here (ariaDescribedby, headingId)?.

Also, TableListView is used in only two other places. Would you mind adding this new attribute (if eventually needed) there as well?

Copy link
Contributor Author

@flash1293 flash1293 Jan 8, 2020

Choose a reason for hiding this comment

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

The reason I introduced new properties is that in some cases the same id has to be used outside of the component - reusing the entity name seems like too much magic. I'm fine with just using a single property - it takes away some flexibility in using the component, but for the current usage it's not relevant.

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.

Found a couple more things: (sorry this didn't happen in one pass!)

  • For the no data sources page, set the callout to have an h1 (it takes a heading prop)
  • Unfortunately, it's not possible to set an ID on that heading so we've got to remove the aria-labelledby on the main#graphBasic tag if we're showing the no data sources page... (If that's not possible, can add a screen reader only p with the right ID so that the main is still labelled.)

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.

@elastic/kibana-app-arch changes LGTM

Copy link
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

I just added a suggestion. But all the rest LGTM! 🎉

@flash1293
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

@flash1293 flash1293 merged commit 204155b into elastic:master Jan 13, 2020
@flash1293 flash1293 deleted the graph/a11y branch January 13, 2020 09:27
flash1293 added a commit to flash1293/kibana that referenced this pull request Jan 13, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 13, 2020
* master: (69 commits)
  [Graph] Fix various a11y issues (elastic#54097)
  Add ApplicationService app status management (elastic#50223)
  logs in one time (elastic#54447)
  Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392)
  [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457)
  Security - Role Mappings UI (elastic#53620)
  [SIEM] [Detection engine] Permission II (elastic#54292)
  Allow User to Cleanup Repository from UI  (elastic#53047)
  [Detection engine] Some UX for rule creation (elastic#54471)
  share specific instances of some ui packages (elastic#54079)
  [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792)
  [APM] Delay rendering invalid license notification (elastic#53924)
  [Graph] Improve error message on graph requests (elastic#54230)
  [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719)
  Unit Tests for common/lib (elastic#53736)
  [Graph] Only show explorable fields (elastic#54101)
  remove linting rule exception for markdown (elastic#54232)
  [Monitoring] Fetch shard data more efficiently (elastic#54028)
  [Maps] Add hiddenLayers option to embeddable map input (elastic#54355)
  Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 13, 2020
* master: (69 commits)
  [Graph] Fix various a11y issues (elastic#54097)
  Add ApplicationService app status management (elastic#50223)
  logs in one time (elastic#54447)
  Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392)
  [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457)
  Security - Role Mappings UI (elastic#53620)
  [SIEM] [Detection engine] Permission II (elastic#54292)
  Allow User to Cleanup Repository from UI  (elastic#53047)
  [Detection engine] Some UX for rule creation (elastic#54471)
  share specific instances of some ui packages (elastic#54079)
  [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792)
  [APM] Delay rendering invalid license notification (elastic#53924)
  [Graph] Improve error message on graph requests (elastic#54230)
  [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719)
  Unit Tests for common/lib (elastic#53736)
  [Graph] Only show explorable fields (elastic#54101)
  remove linting rule exception for markdown (elastic#54232)
  [Monitoring] Fetch shard data more efficiently (elastic#54028)
  [Maps] Add hiddenLayers option to embeddable map input (elastic#54355)
  Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391)
  ...
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jan 13, 2020
…age-offset-floating-tooltip

* 'master' of github.com:elastic/kibana:
  [Maps] refactor isPointsOnly, isLinesOnly, and isPolygonsOnly to make synchronous (elastic#54067)
  Fix icon path in tutorial introduction (elastic#49684)
  [State Management] State containers improvements (elastic#54436)
  Fix floating tools rendering logic (elastic#54505)
  Handle another double quote special case (elastic#54474)
  [Home][Tutorial] Add data UI for IBM MQ Filebeat module (elastic#54238)
  fix(package): upgrade transitive dependency elliptic to v6.5.2 (elastic#54476)
  [Graph] Fix various a11y issues (elastic#54097)

# Conflicts:
#	src/legacy/core_plugins/console/public/np_ready/application/models/legacy_core_editor/legacy_core_editor.ts
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Graph Graph application feature release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graph accessible heading structure
6 participants