+
+
) : (
controlBar
);
From fe410a6a850e97e6060bd118cf58df17901234d4 Mon Sep 17 00:00:00 2001
From: Michail Yasonik
Date: Fri, 14 Feb 2020 14:01:44 -0500
Subject: [PATCH 2/5] adding changelog line and a comment
---
CHANGELOG.md | 1 +
src/components/control_bar/control_bar.tsx | 2 ++
2 files changed, 3 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd58c908825..4b4c6a79ae4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
**Bug fixes**
- Fixed building dev & docs on Windows ([#2847](https://github.com/elastic/eui/pull/2847))
+- Fixed screen reader discovery issues with `EuiBottomBar` and `EuiControlBar` ([#2861](https://github.com/elastic/eui/pull/2861))
## [`19.0.0`](https://github.com/elastic/eui/tree/v19.0.0)
diff --git a/src/components/control_bar/control_bar.tsx b/src/components/control_bar/control_bar.tsx
index 1320951fe88..e21a4d204c4 100644
--- a/src/components/control_bar/control_bar.tsx
+++ b/src/components/control_bar/control_bar.tsx
@@ -407,6 +407,8 @@ export class EuiControlBar extends Component<
token="euiControlBar.screenReaderHeading"
default="Page level controls">
{(screenReaderHeading: string) => (
+ // Though it would be better to use aria-labelledby than aria-label and not repeat the same string twice
+ // A bug in voiceover won't list some landmarks in the rotor without an aria-label
Date: Fri, 14 Feb 2020 17:26:52 -0500
Subject: [PATCH 3/5] updating jest snapshots
---
.../__snapshots__/bottom_bar.test.tsx.snap | 81 +-
.../__snapshots__/control_bar.test.tsx.snap | 1922 ++++++++++-------
2 files changed, 1141 insertions(+), 862 deletions(-)
diff --git a/src/components/bottom_bar/__snapshots__/bottom_bar.test.tsx.snap b/src/components/bottom_bar/__snapshots__/bottom_bar.test.tsx.snap
index 2cc54e4350b..8ec6d9cb6ee 100644
--- a/src/components/bottom_bar/__snapshots__/bottom_bar.test.tsx.snap
+++ b/src/components/bottom_bar/__snapshots__/bottom_bar.test.tsx.snap
@@ -2,74 +2,107 @@
exports[`EuiBottomBar is rendered 1`] = `
Array [
-
- There is a new menu opening with page level controls at the end of the document.
-
,
-
+
+ Page level controls
+
Content
-
,
+ ,
+
+ There is a new region landmark with page level controls at the end of the document.
+
,
]
`;
exports[`EuiBottomBar props paddingSize l is rendered 1`] = `
Array [
+
+
+ Page level controls
+
+ ,
- There is a new menu opening with page level controls at the end of the document.
+ There is a new region landmark with page level controls at the end of the document.
,
- ,
]
`;
exports[`EuiBottomBar props paddingSize m is rendered 1`] = `
Array [
+
+
+ Page level controls
+
+ ,
- There is a new menu opening with page level controls at the end of the document.
+ There is a new region landmark with page level controls at the end of the document.
- There is a new menu opening with page level controls at the end of the document.
+ There is a new region landmark with page level controls at the end of the document.
,
- ,
]
`;
exports[`EuiBottomBar props paddingSize s is rendered 1`] = `
Array [
+
+
+ Page level controls
+
+ ,
- There is a new menu opening with page level controls at the end of the document.
+ There is a new region landmark with page level controls at the end of the document.
+ There is a new region landmark with page level controls at the end of the document.
+
+
+
@@ -702,10 +783,16 @@ exports[`EuiControlBar props mobile is rendered 1`] = `
-
+
+ Page level controls
+
@@ -774,149 +861,181 @@ exports[`EuiControlBar props mobile is rendered 1`] = `
Flight 815
-
+
+
+ There is a new region landmark with page level controls at the end of the document.
+
+ There is a new region landmark with page level controls at the end of the document.
+
+
+
@@ -979,145 +1098,158 @@ exports[`EuiControlBar props position is rendered 1`] = `
showOnMobile={false}
size="l"
>
-
+ There is a new region landmark with page level controls at the end of the document.
+
+
+
@@ -1463,10 +1633,16 @@ exports[`EuiControlBar props showContent is rendered 1`] = `
-
+
+ There is a new region landmark with page level controls at the end of the document.
+
+
+
@@ -1754,10 +1962,16 @@ exports[`EuiControlBar props size is rendered 1`] = `
-
+ There is a new region landmark with page level controls at the end of the document.
+
+
+
From 785de7e6416daaf9282c2ddb269bc73f1af932f2 Mon Sep 17 00:00:00 2001
From: Michail Yasonik
Date: Tue, 18 Feb 2020 18:49:39 -0500
Subject: [PATCH 4/5] fixing i18n string id
---
src/components/bottom_bar/bottom_bar.tsx | 20 ++++++-----
.../context_menu_panel.test.tsx.snap | 36 ++++++++++++++-----
.../__snapshots__/control_bar.test.tsx.snap | 2 +-
src/components/control_bar/control_bar.tsx | 16 ++++-----
4 files changed, 49 insertions(+), 25 deletions(-)
diff --git a/src/components/bottom_bar/bottom_bar.tsx b/src/components/bottom_bar/bottom_bar.tsx
index 5ef9b148079..e8e5ecfdd31 100644
--- a/src/components/bottom_bar/bottom_bar.tsx
+++ b/src/components/bottom_bar/bottom_bar.tsx
@@ -31,7 +31,7 @@ interface Props extends CommonProps {
/**
* Customize the screen reader heading that helps users find this control. Default is "Page level controls".
*/
- title?: string;
+ landmarkHeading?: string;
}
export class EuiBottomBar extends Component {
@@ -58,7 +58,7 @@ export class EuiBottomBar extends Component {
className,
paddingSize = 'm',
bodyClassName,
- title,
+ landmarkHeading,
...rest
} = this.props;
@@ -77,14 +77,18 @@ export class EuiBottomBar extends Component {
// Though it would be better to use aria-labelledby than aria-label and not repeat the same string twice
// A bug in voiceover won't list some landmarks in the rotor without an aria-label
{
this.bar = node;
}}
{...rest}>
-