Commit 9da8cb53 authored by jim's avatar jim

Improve accessibility

parent 344c9f74
...@@ -9,7 +9,12 @@ const GlobalFooter = ({ className, links, copyright }) => { ...@@ -9,7 +9,12 @@ const GlobalFooter = ({ className, links, copyright }) => {
{links && ( {links && (
<div className={styles.links}> <div className={styles.links}>
{links.map(link => ( {links.map(link => (
<a key={link.key} target={link.blankTarget ? '_blank' : '_self'} href={link.href}> <a
key={link.key}
title={link.key}
target={link.blankTarget ? '_blank' : '_self'}
href={link.href}
>
{link.title} {link.title}
</a> </a>
))} ))}
......
...@@ -125,7 +125,12 @@ export default class GlobalHeaderRight extends PureComponent { ...@@ -125,7 +125,12 @@ export default class GlobalHeaderRight extends PureComponent {
{currentUser.name ? ( {currentUser.name ? (
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
<span className={`${styles.action} ${styles.account}`}> <span className={`${styles.action} ${styles.account}`}>
<Avatar size="small" className={styles.avatar} src={currentUser.avatar} /> <Avatar
size="small"
className={styles.avatar}
src={currentUser.avatar}
alt="avatar"
/>
<span className={styles.name}>{currentUser.name}</span> <span className={styles.name}>{currentUser.name}</span>
</span> </span>
</Dropdown> </Dropdown>
......
...@@ -78,6 +78,7 @@ export default class HeaderSearch extends PureComponent { ...@@ -78,6 +78,7 @@ export default class HeaderSearch extends PureComponent {
ref={node => { ref={node => {
this.input = node; this.input = node;
}} }}
aria-label={placeholder}
placeholder={placeholder} placeholder={placeholder}
onKeyDown={this.onKeyDown} onKeyDown={this.onKeyDown}
onBlur={this.leaveSearchMode} onBlur={this.leaveSearchMode}
......
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { Layout, Icon } from 'antd'; import { Layout, Icon } from 'antd';
import GlobalFooter from '../components/GlobalFooter'; import GlobalFooter from '../components/GlobalFooter';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment