diff --git a/CHANGELOG.md b/CHANGELOG.md index bc13fc4afc5..240b9af8bed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Exported `dateFormatAliases` as a part of the public API ([#3043](https://github.com/elastic/eui/pull/3043)) - Exported `EuiTextProps` type definition ([#3039](https://github.com/elastic/eui/pull/3039)) +- Removed `role` attribute from `EuiImage`([#3036](https://github.com/elastic/eui/pull/3036)) - Added `prepend` and `append` ability to `EuiComboBox` single selection only ([#3003](https://github.com/elastic/eui/pull/3003)) **Bug Fixes** diff --git a/scripts/a11y-testing.js b/scripts/a11y-testing.js index af19aac7279..74a55bb9db7 100644 --- a/scripts/a11y-testing.js +++ b/scripts/a11y-testing.js @@ -10,10 +10,57 @@ const docsPages = async (root, page) => { links = links.splice(0, 14); const reflinks = [ + `${root}#/layout/horizontal-rule`, + `${root}#/layout/modal`, + `${root}#/layout/nav-drawer`, + `${root}#/layout/panel`, + `${root}#/layout/popover`, + `${root}#/layout/spacer`, + `${root}#/navigation/breadcrumbs`, + `${root}#/navigation/context-menu`, + `${root}#/navigation/control-bar`, + `${root}#/navigation/link`, + `${root}#/navigation/pagination`, + `${root}#/navigation/steps`, + `${root}#/navigation/tabs`, + `${root}#/display/avatar`, + `${root}#/display/badge`, + `${root}#/display/callout`, + `${root}#/display/card`, + `${root}#/display/description-list`, + `${root}#/display/emptyprompt`, + `${root}#/display/health`, + `${root}#/display/icons`, + `${root}#/display/image`, + `${root}#/display/list-group`, + `${root}#/display/loading`, + `${root}#/display/progress`, + `${root}#/display/stat`, + `${root}#/display/text`, + `${root}#/display/title`, + `${root}#/display/toast`, + `${root}#/display/tooltip`, `${root}#/forms/form-layouts`, + `${root}#/forms/form-validation`, + `${root}#/forms/code-editor`, + `${root}#/forms/expression`, + `${root}#/forms/filter-group`, `${root}#/forms/range-sliders`, - `${root}#/display/progress`, - `${root}#/display/loading`, + `${root}#/forms/search-bar`, + `${root}#/elastic-charts/sizing`, + `${root}#/elastic-charts/time-series`, + `${root}#/elastic-charts/categorical`, + `${root}#/utilities/i18n`, + `${root}#/utilities/is-color-dark`, + `${root}#/utilities/pretty-duration`, + `${root}#/utilities/mutationobserver`, + `${root}#/utilities/outside-click-detector`, + `${root}#/utilities/portal`, + `${root}#/utilities/resizeobserver`, + `${root}#/utilities/responsive`, + `${root}#/utilities/toggle`, + `${root}#/utilities/window-events`, + `${root}#/package/i18n-tokens`, `${root}#/utilities/accessibility`, `${root}#/utilities/context`, `${root}#/utilities/copy`, diff --git a/src-docs/src/components/guide_page/guide_page_chrome.js b/src-docs/src/components/guide_page/guide_page_chrome.js index f5178d217eb..d0670f37817 100644 --- a/src-docs/src/components/guide_page/guide_page_chrome.js +++ b/src-docs/src/components/guide_page/guide_page_chrome.js @@ -155,7 +155,7 @@ export class GuidePageChrome extends Component { diff --git a/src-docs/src/views/avatar/avatar.js b/src-docs/src/views/avatar/avatar.js index 32e38f13e5f..384f871cefb 100644 --- a/src-docs/src/views/avatar/avatar.js +++ b/src-docs/src/views/avatar/avatar.js @@ -13,7 +13,7 @@ export default () => ( -

With image

+

With image

{ return ( -

Accepted color names

+

Accepted color names

diff --git a/src-docs/src/views/breadcrumbs/breadcrumbs.js b/src-docs/src/views/breadcrumbs/breadcrumbs.js index dafc53e499a..22d305d1f86 100644 --- a/src-docs/src/views/breadcrumbs/breadcrumbs.js +++ b/src-docs/src/views/breadcrumbs/breadcrumbs.js @@ -44,7 +44,11 @@ export default () => { return ( - + diff --git a/src-docs/src/views/breadcrumbs/max.js b/src-docs/src/views/breadcrumbs/max.js index d23ff86048a..9c00a8a4da9 100644 --- a/src-docs/src/views/breadcrumbs/max.js +++ b/src-docs/src/views/breadcrumbs/max.js @@ -43,6 +43,7 @@ export default () => { breadcrumbs={breadcrumbs} responsive={false} truncate={false} + aria-label="An example of EuiBreadcrumbs with specifying max prop" /> ); }; diff --git a/src-docs/src/views/breadcrumbs/popover.js b/src-docs/src/views/breadcrumbs/popover.js index f56364b974a..bfabcca5842 100644 --- a/src-docs/src/views/breadcrumbs/popover.js +++ b/src-docs/src/views/breadcrumbs/popover.js @@ -129,6 +129,7 @@ export default () => { truncate={false} max={5} showMaxPopover + aria-label="An example of EuiBreadcrumbs with popover" /> ); diff --git a/src-docs/src/views/breadcrumbs/responsive.js b/src-docs/src/views/breadcrumbs/responsive.js index 93ae02c2a04..8cd2e11a8be 100644 --- a/src-docs/src/views/breadcrumbs/responsive.js +++ b/src-docs/src/views/breadcrumbs/responsive.js @@ -43,7 +43,12 @@ export default () => { return ( - + diff --git a/src-docs/src/views/breadcrumbs/truncate.js b/src-docs/src/views/breadcrumbs/truncate.js index 53b650118f9..9ca7e408d31 100644 --- a/src-docs/src/views/breadcrumbs/truncate.js +++ b/src-docs/src/views/breadcrumbs/truncate.js @@ -54,6 +54,7 @@ export default () => { responsive={false} truncate={false} breadcrumbs={breadcrumbs} + aria-label="An example of EuiBreadcrumbs without truncate prop" /> @@ -64,6 +65,7 @@ export default () => { responsive={false} truncate={true} breadcrumbs={breadcrumbs} + aria-label="An example of EuiBreadcrumbs with truncate prop" /> ); diff --git a/src-docs/src/views/context_menu/context_menu.js b/src-docs/src/views/context_menu/context_menu.js index c737a81f9c7..d14f6ffcb89 100644 --- a/src-docs/src/views/context_menu/context_menu.js +++ b/src-docs/src/views/context_menu/context_menu.js @@ -165,7 +165,7 @@ export default class extends Component { return ( -

+

Number of GitHub issues per visualization type {this.state.multi && ' by type of issue'} -

+
diff --git a/src-docs/src/views/elastic_charts/sizes.js b/src-docs/src/views/elastic_charts/sizes.js index e0568b9dbb1..429d6c6a310 100644 --- a/src-docs/src/views/elastic_charts/sizes.js +++ b/src-docs/src/views/elastic_charts/sizes.js @@ -196,7 +196,7 @@ export class Sizes extends Component { overflow: 'hidden', }}> -

Chart title {multi && ' by type'}

+

Chart title {multi && ' by type'}

diff --git a/src-docs/src/views/elastic_charts/time_chart.js b/src-docs/src/views/elastic_charts/time_chart.js index dc4b182ac4c..48cdef4e883 100644 --- a/src-docs/src/views/elastic_charts/time_chart.js +++ b/src-docs/src/views/elastic_charts/time_chart.js @@ -78,10 +78,10 @@ export class TimeChart extends Component { return ( -

+

Number of {!this.state.multi && 'financial '}robo-calls {this.state.multi && ' by type'} -

+
diff --git a/src-docs/src/views/filter_group/filter_group_multi.js b/src-docs/src/views/filter_group/filter_group_multi.js index 02c41cd1536..c74baa055eb 100644 --- a/src-docs/src/views/filter_group/filter_group_multi.js +++ b/src-docs/src/views/filter_group/filter_group_multi.js @@ -71,7 +71,7 @@ export default class extends Component { return ( { return ( -

- This text field's placeholder reads from{' '} - i18n.renderpropexample -

- {placeholderName => } + {placeholderName => ( + + This text field's placeholder reads from{' '} + i18n.renderpropexample + + }> + + + )}
diff --git a/src-docs/src/views/icon/icon_types.js b/src-docs/src/views/icon/icon_types.js index afb531afd67..0a394ea9ea2 100644 --- a/src-docs/src/views/icon/icon_types.js +++ b/src-docs/src/views/icon/icon_types.js @@ -39,7 +39,7 @@ export default () => (
- +

{'{reactSvg}'}

diff --git a/src-docs/src/views/popover/input_popover.js b/src-docs/src/views/popover/input_popover.js index 3a3b9a868ad..36fed5226ae 100644 --- a/src-docs/src/views/popover/input_popover.js +++ b/src-docs/src/views/popover/input_popover.js @@ -17,7 +17,12 @@ export default () => { setIsPopoverOpenTwo(shouldBeOpen); }; - const input = toggleIsPopoverOpen()} />; + const input = ( + toggleIsPopoverOpen()} + aria-label="Popover attached to input element" + /> + ); const inputTwo = ( { toggleIsPopoverOpenTwo(); }} style={{ width: inputWidth }} + aria-label="Popover attached to an adjustable sized input element" /> ); return ( { @@ -44,7 +49,6 @@ export default () => { { diff --git a/src-docs/src/views/popover/popover.js b/src-docs/src/views/popover/popover.js index 6dba1d11888..ae02bb79e15 100644 --- a/src-docs/src/views/popover/popover.js +++ b/src-docs/src/views/popover/popover.js @@ -35,7 +35,6 @@ export default class extends Component { return ( diff --git a/src-docs/src/views/popover/popover_anchor_position.js b/src-docs/src/views/popover/popover_anchor_position.js index 881799690d4..662f3583331 100644 --- a/src-docs/src/views/popover/popover_anchor_position.js +++ b/src-docs/src/views/popover/popover_anchor_position.js @@ -181,7 +181,6 @@ export default class extends Component { diff --git a/src-docs/src/views/popover/popover_panel_class_name.js b/src-docs/src/views/popover/popover_panel_class_name.js index 880d00aefae..0261e20a69b 100644 --- a/src-docs/src/views/popover/popover_panel_class_name.js +++ b/src-docs/src/views/popover/popover_panel_class_name.js @@ -26,7 +26,6 @@ export default class extends Component { render() { return ( -

+ +

Option 1: If you have this type of instance -

+

  1. Do thing 1
  2. @@ -71,9 +71,9 @@ const steps = [
  3. Do thing 3
-

+

Option 2: If you have the other type of instance -

+
  1. Do thing 1
  2. diff --git a/src-docs/src/views/tabs/tabbed_content.js b/src-docs/src/views/tabs/tabbed_content.js index acb7746c754..b40ac3620d2 100644 --- a/src-docs/src/views/tabs/tabbed_content.js +++ b/src-docs/src/views/tabs/tabbed_content.js @@ -13,7 +13,7 @@ class EuiTabsExample extends Component { this.tabs = [ { - id: 'cobalt', + id: 'cobalt--id', name: 'Cobalt', content: ( @@ -32,7 +32,7 @@ class EuiTabsExample extends Component { ), }, { - id: 'dextrose', + id: 'dextrose--id', name: 'Dextrose', content: ( @@ -49,7 +49,7 @@ class EuiTabsExample extends Component { ), }, { - id: 'hydrogen', + id: 'hydrogen--id', name: 'Hydrogen', content: ( @@ -66,7 +66,7 @@ class EuiTabsExample extends Component { ), }, { - id: 'monosodium_glutammate', + id: 'monosodium_glutammate--id', name: 'Monosodium Glutamate', content: ( diff --git a/src-docs/src/views/tool_tip/tool_tip.js b/src-docs/src/views/tool_tip/tool_tip.js index ad7a159c3d4..629f8c157b1 100644 --- a/src-docs/src/views/tool_tip/tool_tip.js +++ b/src-docs/src/views/tool_tip/tool_tip.js @@ -57,7 +57,10 @@ export default () => ( - + diff --git a/src/components/image/__snapshots__/image.test.tsx.snap b/src/components/image/__snapshots__/image.test.tsx.snap index 2627b8bba43..1b6d508ffdf 100644 --- a/src/components/image/__snapshots__/image.test.tsx.snap +++ b/src/components/image/__snapshots__/image.test.tsx.snap @@ -3,7 +3,6 @@ exports[`EuiImage is rendered 1`] = `
    alt