From 89ce8345b4e8c30420e2fcc15a0ddba54d5d0403 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 24 Nov 2020 17:25:27 +0800 Subject: [PATCH] feat(Popover): improve a11y (#7624) --- src/popover/index.js | 5 +++-- src/popover/index.less | 2 ++ src/popover/test/__snapshots__/index.spec.js.snap | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/popover/index.js b/src/popover/index.js index ed1024152..c66c52bab 100644 --- a/src/popover/index.js +++ b/src/popover/index.js @@ -114,13 +114,14 @@ export default createComponent({ renderAction(action, index) { const { icon, text, disabled, className } = action; return ( -
this.onClickAction(action, index)} > {icon && }
{text}
-
+ ); }, diff --git a/src/popover/index.less b/src/popover/index.less index de5ce500c..a717183c0 100644 --- a/src/popover/index.less +++ b/src/popover/index.less @@ -34,6 +34,8 @@ padding: 0 @padding-md; font-size: @popover-action-font-size; line-height: @line-height-md; + background-color: transparent; + border: none; cursor: pointer; &:last-child { diff --git a/src/popover/test/__snapshots__/index.spec.js.snap b/src/popover/test/__snapshots__/index.spec.js.snap index 5cb3f0706..54423dcbc 100644 --- a/src/popover/test/__snapshots__/index.spec.js.snap +++ b/src/popover/test/__snapshots__/index.spec.js.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should allow to custom the className of action 1`] = ` -
+
+ `; exports[`should locate to reference element when showed 1`] = ``;