Skip to content

Commit

Permalink
[a11y][search connectors] Fix a11y with connectors table (elastic#201421
Browse files Browse the repository at this point in the history
)

## Summary

from issue: When Search doesn't provide any results, it should not only
be present visually, but it should also be announced. Especially for the
users using assistive technology, that they would understand that no
matching elements were found.


Add table caption and `aria-live` announcement when no connectors found:

+ additionally customize the 'no items found' message and add table
caption to further improve a11y

<img width="1287" alt="Screenshot 2024-11-22 at 16 30 33"
src="https://github.com/user-attachments/assets/2bce17f9-f6cf-4357-a679-54d43a247493">



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
  • Loading branch information
jedrazb authored Nov 26, 2024
1 parent 1865869 commit 75f5d59
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
EuiBasicTableColumn,
EuiFlexGroup,
EuiFlexItem,
EuiText,
} from '@elastic/eui';

import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -221,7 +222,18 @@ export const ConnectorsTable: React.FC<ConnectorsTableProps> = ({
columns={columns}
onChange={onChange}
tableLayout="fixed"
tableCaption={i18n.translate(
'xpack.enterpriseSearch.connectorsTable.table.availableConnectorsTableCaption',
{ defaultMessage: 'Available connectors table' }
)}
loading={isLoading}
noItemsMessage={
<EuiText aria-live="polite" size="s">
{i18n.translate('xpack.enterpriseSearch.connectorsTable.table.noResultsMessage', {
defaultMessage: 'No connectors found',
})}
</EuiText>
}
pagination={{
pageIndex: meta.page.from / (meta.page.size || 1),
pageSize: meta.page.size,
Expand Down

0 comments on commit 75f5d59

Please sign in to comment.