From 7fe794ace8fcc0a0e8866a1849d8042a63372812 Mon Sep 17 00:00:00 2001 From: Philipp B Date: Thu, 20 Jun 2019 16:41:11 +0300 Subject: [PATCH] (Accessibility) NVDA/JAWS support for `EuiGlobalToastList` (#2055) * Added NVDA, JAWS support for `EuiGlobalToastList` --- CHANGELOG.md | 1 + .../toast/__snapshots__/global_toast_list.test.tsx.snap | 6 ++++-- src/components/toast/__snapshots__/toast.test.tsx.snap | 7 ------- src/components/toast/global_toast_list.tsx | 2 ++ src/components/toast/toast.tsx | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d60ef5b24a2..5c6e8d7d89c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Changed `EuiNavDrawerFlyout` title from `h5` to `div` ([#2040](https://github.com/elastic/eui/pull/2040)) +- Converted `EuiGlobalToastList` into ARIA live region by adding `role="region"` attribute to add NVDA/JAWS support ([#2055](https://github.com/elastic/eui/pull/2055)) - Added `magnifyWithMinus` and `magnifyWithPlus` glyphs to `EuiIcon` ([2056](https://github.com/elastic/eui/pull/2056)) - Added a fully black (no matter the theme) color SASS variable `$euiColorInk` ([2060](https://github.com/elastic/eui/pull/2060)) diff --git a/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap b/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap index 9e229edf0a5..6b783f2bb15 100644 --- a/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap +++ b/src/components/toast/__snapshots__/global_toast_list.test.tsx.snap @@ -3,17 +3,20 @@ exports[`EuiGlobalToastList is rendered 1`] = `
`; exports[`EuiGlobalToastList props toasts is rendered 1`] = `
@@ -47,7 +46,6 @@ exports[`EuiToast Props color primary is rendered 1`] = ` title="test title" >
@@ -88,7 +86,6 @@ exports[`EuiToast Props color success is rendered 1`] = ` title="test title" >
@@ -129,7 +126,6 @@ exports[`EuiToast Props color warning is rendered 1`] = ` title="test title" >
@@ -170,7 +166,6 @@ exports[`EuiToast Props iconType is rendered 1`] = ` title="test title" >
@@ -234,7 +229,6 @@ exports[`EuiToast Props title is rendered 1`] = ` title="toast title" >
@@ -272,7 +266,6 @@ exports[`EuiToast Props title is rendered 1`] = ` exports[`EuiToast is rendered 1`] = `
diff --git a/src/components/toast/global_toast_list.tsx b/src/components/toast/global_toast_list.tsx index d10c8505164..3c457e20418 100644 --- a/src/components/toast/global_toast_list.tsx +++ b/src/components/toast/global_toast_list.tsx @@ -253,6 +253,8 @@ export class EuiGlobalToastList extends Component< return (
{ this.listElement = element; }} diff --git a/src/components/toast/toast.tsx b/src/components/toast/toast.tsx index be2d69aeef9..e654e3d7a5b 100644 --- a/src/components/toast/toast.tsx +++ b/src/components/toast/toast.tsx @@ -95,7 +95,7 @@ export const EuiToast: FunctionComponent = ({ } return ( -
+