-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7f8244b
fix various a11y issues
flash1293 35679b7
Merge remote-tracking branch 'upstream/master' into graph/a11y
flash1293 bddc98c
Merge remote-tracking branch 'upstream/master' into graph/a11y
flash1293 9f6853f
fix additional a11y issues
flash1293 2c87d99
simplify table list view and fix heading structure for visualize and …
flash1293 c460819
fix unit tests
flash1293 579d769
Merge remote-tracking branch 'upstream/master' into graph/a11y
flash1293 f1502e2
Update src/plugins/kibana_react/public/table_list_view/table_list_vie…
flash1293 17bff7b
Update src/plugins/kibana_react/public/table_list_view/table_list_vie…
flash1293 18cc05a
Update x-pack/legacy/plugins/graph/public/angular/templates/index.html
flash1293 92e1b17
Update x-pack/legacy/plugins/graph/public/components/guidance_panel/g…
flash1293 173f8ac
Update x-pack/legacy/plugins/graph/public/angular/templates/_sidebar.…
flash1293 71f7ecc
Merge branch 'graph/a11y' of github.com:flash1293/kibana into graph/a11y
flash1293 3cd3ed5
fix a11y of no data page
flash1293 e9bf311
Merge remote-tracking branch 'upstream/master' into graph/a11y
flash1293 0554990
only show labelled-by if listing content is already fetched
flash1293 1cc7a0d
fix table list view labelledby attribute during loading
flash1293 e6c1c89
Merge branch 'master' into graph/a11y
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
x-pack/legacy/plugins/graph/public/components/graph_title.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { connect } from 'react-redux'; | ||
import { EuiScreenReaderOnly } from '@elastic/eui'; | ||
import React from 'react'; | ||
|
||
import { GraphState, metaDataSelector } from '../state_management'; | ||
|
||
interface GraphTitleProps { | ||
title: string; | ||
} | ||
|
||
/** | ||
* Component showing the title of the current workspace as a heading visible for screen readers | ||
*/ | ||
export const GraphTitle = connect<GraphTitleProps, {}, {}, GraphState>((state: GraphState) => ({ | ||
title: metaDataSelector(state).title, | ||
}))(({ title }: GraphTitleProps) => ( | ||
<EuiScreenReaderOnly> | ||
<h1 id="graphHeading">{title}</h1> | ||
</EuiScreenReaderOnly> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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.