From 9da8cb5396a188c6f0733f525666506266e341ee Mon Sep 17 00:00:00 2001 From: jim Date: Wed, 6 Jun 2018 10:55:19 +0800 Subject: [PATCH] Improve accessibility --- src/components/GlobalFooter/index.js | 7 ++++++- src/components/GlobalHeader/RightContent.js | 7 ++++++- src/components/HeaderSearch/index.js | 1 + src/layouts/Footer.js | 1 - 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/GlobalFooter/index.js b/src/components/GlobalFooter/index.js index f5572131..01e526e8 100644 --- a/src/components/GlobalFooter/index.js +++ b/src/components/GlobalFooter/index.js @@ -9,7 +9,12 @@ const GlobalFooter = ({ className, links, copyright }) => { {links && (
{links.map(link => ( - + {link.title} ))} diff --git a/src/components/GlobalHeader/RightContent.js b/src/components/GlobalHeader/RightContent.js index 35d41309..15511f9a 100644 --- a/src/components/GlobalHeader/RightContent.js +++ b/src/components/GlobalHeader/RightContent.js @@ -125,7 +125,12 @@ export default class GlobalHeaderRight extends PureComponent { {currentUser.name ? ( - + {currentUser.name} diff --git a/src/components/HeaderSearch/index.js b/src/components/HeaderSearch/index.js index 5912dc50..a7fb0e77 100644 --- a/src/components/HeaderSearch/index.js +++ b/src/components/HeaderSearch/index.js @@ -78,6 +78,7 @@ export default class HeaderSearch extends PureComponent { ref={node => { this.input = node; }} + aria-label={placeholder} placeholder={placeholder} onKeyDown={this.onKeyDown} onBlur={this.leaveSearchMode} diff --git a/src/layouts/Footer.js b/src/layouts/Footer.js index 902d4ab8..69c2c2a8 100644 --- a/src/layouts/Footer.js +++ b/src/layouts/Footer.js @@ -1,4 +1,3 @@ - import React, { Fragment } from 'react'; import { Layout, Icon } from 'antd'; import GlobalFooter from '../components/GlobalFooter'; -- GitLab