mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +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 React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { findDOMNode } from 'react-dom';
|
|
||||||
import Icon from '../icon';
|
import Icon from '../icon';
|
||||||
import omit from 'omit.js';
|
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
|
// Handle auto focus when click button in Chrome
|
||||||
handleMouseUp = (e) => {
|
handleMouseUp = (e) => {
|
||||||
(findDOMNode(this) as HTMLElement).blur();
|
|
||||||
if (this.props.onMouseUp) {
|
if (this.props.onMouseUp) {
|
||||||
this.props.onMouseUp(e);
|
this.props.onMouseUp(e);
|
||||||
}
|
}
|
||||||
|
@ -51,11 +51,11 @@ class NormalLoginForm extends React.Component {
|
|||||||
})(
|
})(
|
||||||
<Checkbox>Remember me</Checkbox>
|
<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">
|
<Button type="primary" htmlType="submit" className="login-form-button">
|
||||||
Log in
|
Log in
|
||||||
</Button>
|
</Button>
|
||||||
Or <a>register now!</a>
|
Or <a href="">register now!</a>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
@ -212,7 +212,7 @@ class RegistrationForm extends React.Component {
|
|||||||
{getFieldDecorator('agreement', {
|
{getFieldDecorator('agreement', {
|
||||||
valuePropName: 'checked',
|
valuePropName: 'checked',
|
||||||
})(
|
})(
|
||||||
<Checkbox>I have read the <a>agreement</a></Checkbox>
|
<Checkbox>I have read the <a href="">agreement</a></Checkbox>
|
||||||
)}
|
)}
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem {...tailFormItemLayout}>
|
<FormItem {...tailFormItemLayout}>
|
||||||
|
@ -61,6 +61,10 @@ a {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color .3s ease;
|
transition: color .3s ease;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: @link-hover-color;
|
color: @link-hover-color;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,9 @@ body {
|
|||||||
|
|
||||||
a {
|
a {
|
||||||
transition: color .3s ease;
|
transition: color .3s ease;
|
||||||
|
&:focus {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-wrapper {
|
.main-wrapper {
|
||||||
|
Loading…
Reference in New Issue
Block a user