Skip to content

Commit

Permalink
[ML] Accessibility fix for structural markup on table rows (#55075)
Browse files Browse the repository at this point in the history
* [ML] Accessibility fix for structural markup on table rows

* [ML] Fix type error on Transforms table cell for scope property
  • Loading branch information
peteharverson authored Jan 17, 2020
1 parent 102bd2b commit d740ec3
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ const AnnotationsTable = injectI18n(
}),
sortable: true,
width: '50%',
scope: 'row',
},
{
field: 'timestamp',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export function getColumns(
defaultMessage: 'time',
}),
dataType: 'date',
scope: 'row',
render: date => renderTime(date, interval),
textOnly: true,
sortable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface FieldDataColumnType<T> {
render?: RenderFunc;
footer?: string | ReactElement | FooterFunc;
textOnly?: boolean;
scope?: 'col' | 'row' | 'colgroup' | 'rowgroup';
'data-test-subj'?: string;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export const getColumns = (
sortable: true,
truncateText: true,
'data-test-subj': 'mlAnalyticsTableColumnId',
scope: 'row',
},
{
field: DataFrameAnalyticsListColumn.description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class ForecastsTableUI extends Component {
render: date => formatDate(date, TIME_FORMAT),
textOnly: true,
sortable: true,
scope: 'row',
},
{
field: 'forecast_start_timestamp',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class JobsListUI extends Component {
sortable: true,
truncateText: false,
width: '20%',
scope: 'row',
render: isManagementTable ? id => this.getJobIdLink(id) : undefined,
},
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const EventsTable = injectI18n(function EventsTable({
}),
sortable: true,
truncateText: true,
scope: 'row',
},
{
field: 'start_time',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const CalendarsListTable = injectI18n(function CalendarsListTable({
}),
sortable: true,
truncateText: true,
scope: 'row',
render: id => <EuiLink href={`#/settings/calendars_list/edit_calendar/${id}`}>{id}</EuiLink>,
},
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function getColumns() {
}),
render: id => <EuiLink href={`#/settings/filter_lists/edit_filter_list/${id}`}>{id}</EuiLink>,
sortable: true,
scope: 'row',
},
{
field: 'description',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const getColumns = (
name: 'ID',
sortable: true,
truncateText: true,
scope: 'row',
},
{
field: TRANSFORM_LIST_COLUMN.DESCRIPTION,
Expand Down

0 comments on commit d740ec3

Please sign in to comment.