forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [Rules > Add Elastic rules][SCREEN READER]: Table headers must b…
…e programmatically determinable (elastic#178765) Closes: elastic/security-team#8654 Closes: elastic/security-team#8645 Closes: elastic/security-team#8641 Closes: elastic/security-team#8647 ## Description The Add Elastic Rules table has three columns that do not include table header text. Screen reader users depend on these column headers to make the column -> data cell information relationship. Screenshot attached below. ### Steps to recreate 1. Open [Add Elastic rules](https://kibana.siem.estc.dev/app/security/rules/add_rules) 2. Ensure at least 1 rule is not added to monitoring so the table populates 3. Turn on your preferred screen reader and skip to the table (screen reader shortcuts in the vendor guidance below) 4. Navigate the table by cell to cell and verify the Integrations, Tags, and Actions cells do not announce a table header ### Screenshots or Trace Logs <img width="1498" alt="Screenshot 2024-02-09 at 3 09 20 PM" src="https://github.com/elastic/security-team/assets/934879/0f390da2-1b70-450f-83f4-c7cb62632f1e"> ### Solution - `RulesTableEmptyColumnName` component was added and applied to all columns with `name = null || ""` <img width="1170" alt="image" src="https://github.com/elastic/kibana/assets/20072247/54c9544b-1add-443f-905a-0a2e766eea63">
- Loading branch information
Showing
5 changed files
with
42 additions
and
8 deletions.
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
24 changes: 24 additions & 0 deletions
24
...ection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.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,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import React, { type FC } from 'react'; | ||
import { EuiScreenReaderOnly } from '@elastic/eui'; | ||
|
||
interface RulesTableEmptyColumnNameProps { | ||
name: string; | ||
} | ||
|
||
export const RulesTableEmptyColumnName: FC<RulesTableEmptyColumnNameProps> = React.memo( | ||
({ name }) => { | ||
return ( | ||
<EuiScreenReaderOnly> | ||
<p>{name}</p> | ||
</EuiScreenReaderOnly> | ||
); | ||
} | ||
); | ||
|
||
RulesTableEmptyColumnName.displayName = 'RulesTableEmptyColumnName'; |
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