diff --git a/src/components/views/context_menus/TopLeftMenu.js b/src/components/views/context_menus/TopLeftMenu.js
index 278c879404..14e93044f4 100644
--- a/src/components/views/context_menus/TopLeftMenu.js
+++ b/src/components/views/context_menus/TopLeftMenu.js
@@ -23,6 +23,7 @@ import Modal from "../../../Modal";
import SdkConfig from '../../../SdkConfig';
import { getHostingLink } from '../../../utils/HostingLink';
import MatrixClientPeg from '../../../MatrixClientPeg';
+import {focusCapturedRef} from "../../../utils/Accessibility";
export class TopLeftMenu extends React.Component {
static propTypes = {
@@ -61,44 +62,48 @@ export class TopLeftMenu extends React.Component {
{_t(
"Upgrade to your own domain", {},
{
- a: sub => {sub},
+ a: sub => {sub},
},
)}
-
+
;
}
- let homePageSection = null;
+ let homePageItem = null;
if (this.hasHomePage()) {
- homePageSection =
;
+ homePageItem =
+ {_t("Home")}
+ ;
}
- let signInOutSection;
+ let signInOutItem;
if (isGuest) {
- signInOutSection = ;
+ signInOutItem =
+ {_t("Sign in")}
+ ;
} else {
- signInOutSection = ;
+ signInOutItem =
+ {_t("Sign out")}
+ ;
}
- return
-
+ const settingsItem =
+ {_t("Settings")}
+ ;
+
+ return
+
{this.props.displayName}
-
{this.props.userId}
+
{this.props.userId}
{hostingSignup}
- {homePageSection}
- - {_t("Settings")}
+ {homePageItem}
+ {settingsItem}
+ {signInOutItem}
- {signInOutSection}
;
}
diff --git a/src/utils/Accessibility.js b/src/utils/Accessibility.js
new file mode 100644
index 0000000000..dbdfeec7df
--- /dev/null
+++ b/src/utils/Accessibility.js
@@ -0,0 +1,19 @@
+/*
+Copyright 2019 The Matrix.org Foundation C.I.C.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+export function focusCapturedRef(ref) {
+ if (ref) ref.focus();
+}
\ No newline at end of file