From b95207d58e678ee7b683bc1f3bc69e2855549c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Sun, 31 May 2020 11:50:26 +0800 Subject: [PATCH] Revert "fix: make upload action buttons focusable (#24604)" (#24608) This reverts commit 8e20fe67793974152c1d0092a3452fa6faf86671. --- .../__snapshots__/components.test.js.snap | 12 +++--- components/upload/UploadList.tsx | 9 +--- .../__tests__/__snapshots__/demo.test.js.snap | 42 +++++++++---------- .../__snapshots__/uploadlist.test.js.snap | 26 ++++++------ components/upload/style/index.less | 21 ++++------ 5 files changed, 48 insertions(+), 62 deletions(-) diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 5165d1cbb2..5ceeba228f 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -37634,7 +37634,7 @@ exports[`ConfigProvider components Upload configProvider 1`] = ` aria-label="delete" class="anticon anticon-delete" role="img" - tabindex="0" + tabindex="-1" title="Remove file" > { }); } return ( - + {customIcon} ); @@ -201,11 +201,7 @@ export default class UploadList extends React.Component { () => this.handleClose(file), locale.removeFile, )) || ( - this.handleClose(file)} - tabIndex={0} - /> + this.handleClose(file)} /> ) : null; @@ -220,7 +216,6 @@ export default class UploadList extends React.Component { this.handleDownload(file)} - tabIndex={0} /> ) : null; diff --git a/components/upload/__tests__/__snapshots__/demo.test.js.snap b/components/upload/__tests__/__snapshots__/demo.test.js.snap index a6360f9116..162f5cfb3a 100644 --- a/components/upload/__tests__/__snapshots__/demo.test.js.snap +++ b/components/upload/__tests__/__snapshots__/demo.test.js.snap @@ -181,7 +181,7 @@ exports[`renders ./components/upload/demo/crop-image.md correctly 1`] = ` aria-label="delete" class="anticon anticon-delete" role="img" - tabindex="0" + tabindex="-1" title="Remove file" > download @@ -2708,8 +2706,6 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly title="Download file" > download diff --git a/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap b/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap index 45570b5c0b..870e2796eb 100644 --- a/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap +++ b/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap @@ -77,7 +77,7 @@ exports[`Upload List handle error 1`] = ` aria-label="delete" class="anticon anticon-delete" role="img" - tabindex="0" + tabindex="-1" title="Remove file" >