mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
Merge pull request #5597 from kenaniah/accessibility
Improves link + button focusing
This commit is contained in:
commit
accb6cbfeb
@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { findDOMNode } from 'react-dom';
|
||||
import Icon from '../icon';
|
||||
import omit from 'omit.js';
|
||||
|
||||
@ -119,7 +118,6 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
|
||||
// Handle auto focus when click button in Chrome
|
||||
handleMouseUp = (e) => {
|
||||
(findDOMNode(this) as HTMLElement).blur();
|
||||
if (this.props.onMouseUp) {
|
||||
this.props.onMouseUp(e);
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ class NormalLoginForm extends React.Component {
|
||||
})(
|
||||
<Checkbox>Remember me</Checkbox>
|
||||
)}
|
||||
<a className="login-form-forgot">Forgot password</a>
|
||||
<a className="login-form-forgot" href="">Forgot password</a>
|
||||
<Button type="primary" htmlType="submit" className="login-form-button">
|
||||
Log in
|
||||
</Button>
|
||||
Or <a>register now!</a>
|
||||
Or <a href="">register now!</a>
|
||||
</FormItem>
|
||||
</Form>
|
||||
);
|
||||
|
@ -212,7 +212,7 @@ class RegistrationForm extends React.Component {
|
||||
{getFieldDecorator('agreement', {
|
||||
valuePropName: 'checked',
|
||||
})(
|
||||
<Checkbox>I have read the <a>agreement</a></Checkbox>
|
||||
<Checkbox>I have read the <a href="">agreement</a></Checkbox>
|
||||
)}
|
||||
</FormItem>
|
||||
<FormItem {...tailFormItemLayout}>
|
||||
|
@ -61,6 +61,10 @@ a {
|
||||
cursor: pointer;
|
||||
transition: color .3s ease;
|
||||
|
||||
&:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: @link-hover-color;
|
||||
}
|
||||
|
@ -20,6 +20,9 @@ body {
|
||||
|
||||
a {
|
||||
transition: color .3s ease;
|
||||
&:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.main-wrapper {
|
||||
|
Loading…
Reference in New Issue
Block a user