[ML] Accessibility fix for structural markup on table rows (#55075) (#55181)

* [ML] Accessibility fix for structural markup on table rows

* [ML] Fix type error on Transforms table cell for scope property
This commit is contained in:
Pete Harverson 2020-01-17 15:45:55 +00:00 committed by GitHub
parent 52fc921f09
commit ea7bfbf36e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 16 additions and 0 deletions

View file

@ -9,6 +9,7 @@ exports[`AnnotationsTable Initialization with annotations prop. 1`] = `
Object {
"field": "annotation",
"name": "Annotation",
"scope": "row",
"sortable": true,
"width": "50%",
},

View file

@ -323,6 +323,7 @@ const AnnotationsTable = injectI18n(
}),
sortable: true,
width: '50%',
scope: 'row',
},
{
field: 'timestamp',

View file

@ -101,6 +101,7 @@ export function getColumns(
defaultMessage: 'time',
}),
dataType: 'date',
scope: 'row',
render: date => renderTime(date, interval),
textOnly: true,
sortable: true,

View file

@ -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;
}

View file

@ -182,6 +182,7 @@ export const getColumns = (
sortable: true,
truncateText: true,
'data-test-subj': 'mlAnalyticsTableColumnId',
scope: 'row',
},
{
field: DataFrameAnalyticsListColumn.description,

View file

@ -204,6 +204,7 @@ class ForecastsTableUI extends Component {
render: date => formatDate(date, TIME_FORMAT),
textOnly: true,
sortable: true,
scope: 'row',
},
{
field: 'forecast_start_timestamp',

View file

@ -172,6 +172,7 @@ class JobsListUI extends Component {
sortable: true,
truncateText: false,
width: '20%',
scope: 'row',
render: isManagementTable ? id => this.getJobIdLink(id) : undefined,
},
{

View file

@ -11,6 +11,7 @@ exports[`EventsTable Renders events table with no search bar 1`] = `
Object {
"field": "description",
"name": "Description",
"scope": "row",
"sortable": true,
"truncateText": true,
},
@ -79,6 +80,7 @@ exports[`EventsTable Renders events table with search bar 1`] = `
Object {
"field": "description",
"name": "Description",
"scope": "row",
"sortable": true,
"truncateText": true,
},

View file

@ -63,6 +63,7 @@ export const EventsTable = injectI18n(function EventsTable({
}),
sortable: true,
truncateText: true,
scope: 'row',
},
{
field: 'start_time',

View file

@ -9,6 +9,7 @@ exports[`CalendarsListTable renders the table with all calendars 1`] = `
"field": "calendar_id",
"name": "ID",
"render": [Function],
"scope": "row",
"sortable": true,
"truncateText": true,
},

View file

@ -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>,
},
{

View file

@ -10,6 +10,7 @@ exports[`Filter Lists Table renders with filter lists and selection supplied 1`]
"field": "filter_id",
"name": "ID",
"render": [Function],
"scope": "row",
"sortable": true,
},
Object {
@ -118,6 +119,7 @@ exports[`Filter Lists Table renders with filter lists supplied 1`] = `
"field": "filter_id",
"name": "ID",
"render": [Function],
"scope": "row",
"sortable": true,
},
Object {

View file

@ -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',

View file

@ -138,6 +138,7 @@ export const getColumns = (
name: 'ID',
sortable: true,
truncateText: true,
scope: 'row',
},
{
field: TRANSFORM_LIST_COLUMN.DESCRIPTION,