fix: add role="button" props to div (#44494)

* fix: add role="button" props to div

* fix: fix
This commit is contained in:
lijianan 2023-08-29 15:04:03 +08:00 committed by GitHub
parent c70ba36540
commit fae1fef77d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,3 @@
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
import React, { useContext, useEffect, useRef, useState } from 'react';
import {
CheckOutlined,
@ -542,7 +541,12 @@ createRoot(document.getElementById('container')).render(<Demo />);
styleCode={style}
onCodeTypeChange={setCodeType}
/>
<div tabIndex={0} className={styles.codeHideBtn} onClick={() => setCodeExpand(false)}>
<div
tabIndex={0}
role="button"
className={styles.codeHideBtn}
onClick={() => setCodeExpand(false)}
>
<UpOutlined />
<FormattedMessage id="app.demo.code.hide.simplify" />
</div>