10BC0 fix(Table): updated a11y for empty/nontext Th components by thatblindgeye · Pull Request #10152 · patternfly/patternfly-react · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ export const FilterAttributeSearch: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export const FilterCheckboxSelect: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ export const FilterFaceted: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export const FilterMixedSelectGroup: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
Original file line number Diff line number Diff line change
8B92 Expand Up @@ -490,7 +490,7 @@ export const FilterSameSelectGroup: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const FilterSearchInput: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export const FilterSingleSelect: React.FunctionComponent = () => {
<Table aria-label="Selectable table">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th width={20}>{columnNames.name}</Th>
<Th width={10}>{columnNames.threads}</Th>
<Th width={10}>{columnNames.apps}</Th>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core/src/demos/examples/Card/CardStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const CardStatus: React.FunctionComponent = () => {
<Table variant="compact">
<Thead>
<Tr>
<Th />
<Th screenReaderText="Row expansion" />
{columns.map((column, columnIndex) => (
<Th key={columnIndex} modifier="fitContent">
{column}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export const TablesAndTabs = () => {
<Table aria-label="`Composable` table">
<Thead noWrap>
<Tr>
<Th />
<Th screenReaderText="Row select" />
<Th>{columnNames.name}</Th>
<Th>{columnNames.branches}</Th>
<Th>{columnNames.prs}</Th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ describe('Table Selectable Test', () => {
});

it('Check number of columns', () => {
cy.get('thead').find('th').should('have.length', 5);

// There should be a canSelectAll input
cy.get('thead').find('td').should('have.length', 1);
cy.get('thead').find('th').should('have.length', 6);
});

it('Test selectable checkbox', () => {
Expand Down