Browse Source

chore: release merge fix-aria branch

走鹃 3 years ago
parent
commit
19ea4b5b84
2 changed files with 2 additions and 1 deletions
  1. 1 1
      packages/semi-ui/button/__test__/button.test.js
  2. 1 0
      packages/semi-ui/spin/icon.tsx

+ 1 - 1
packages/semi-ui/button/__test__/button.test.js

@@ -29,7 +29,7 @@ describe('Button', () => {
 
     it(`test loading`, () => {
         const elem = mount(<Button icon={<IconEdit />} loading />);
-        expect(elem.find({ 'aria-label': 'spin' }).length).toBe(1);
+        expect(elem.find({ 'data-icon': 'spin' }).length).toBe(1);
     });
 
     it('test button type',()=>{

+ 1 - 0
packages/semi-ui/spin/icon.tsx

@@ -30,6 +30,7 @@ function Icon(props: IconProps = {}) {
             version="1.1"
             xmlns="http://www.w3.org/2000/svg"
             aria-hidden
+            data-icon="spin"
         >
             <defs>
                 <linearGradient x1="0%" y1="100%" x2="100%" y2="100%" id={id}>