Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove aria-hidden #6688

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4626,7 +4626,7 @@ exports[`ConfigProvider should display the text as ar-SA 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -9263,7 +9263,7 @@ exports[`ConfigProvider should display the text as da-DK 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -13900,7 +13900,7 @@ exports[`ConfigProvider should display the text as de-DE 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -18537,7 +18537,7 @@ exports[`ConfigProvider should display the text as en 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -23174,7 +23174,7 @@ exports[`ConfigProvider should display the text as es 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -27811,7 +27811,7 @@ exports[`ConfigProvider should display the text as fa-IR 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -32448,7 +32448,7 @@ exports[`ConfigProvider should display the text as fr-FR 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -37085,7 +37085,7 @@ exports[`ConfigProvider should display the text as hu 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -41722,7 +41722,7 @@ exports[`ConfigProvider should display the text as id-ID 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -46359,7 +46359,7 @@ exports[`ConfigProvider should display the text as in-ID 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -50996,7 +50996,7 @@ exports[`ConfigProvider should display the text as it-IT 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -55633,7 +55633,7 @@ exports[`ConfigProvider should display the text as ja-JP 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -60270,7 +60270,7 @@ exports[`ConfigProvider should display the text as kk-KZ 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -64907,7 +64907,7 @@ exports[`ConfigProvider should display the text as ko-KR 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -69544,7 +69544,7 @@ exports[`ConfigProvider should display the text as ms-MY 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -74181,7 +74181,7 @@ exports[`ConfigProvider should display the text as nb-NO 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -78818,7 +78818,7 @@ exports[`ConfigProvider should display the text as nl-NL 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -83455,7 +83455,7 @@ exports[`ConfigProvider should display the text as pt-BR 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -88092,7 +88092,7 @@ exports[`ConfigProvider should display the text as ru 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -92729,7 +92729,7 @@ exports[`ConfigProvider should display the text as th-TH 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -97366,7 +97366,7 @@ exports[`ConfigProvider should display the text as tr-TR 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -102003,7 +102003,7 @@ exports[`ConfigProvider should display the text as vi-VN 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -106640,7 +106640,7 @@ exports[`ConfigProvider should display the text as zh-CH 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -111277,7 +111277,7 @@ exports[`ConfigProvider should display the text as zh-HK 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -115914,7 +115914,7 @@ exports[`ConfigProvider should display the text as zh-TW 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/image-uploader/image-uploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const ImageUploader = forwardRef<ImageUploaderRef, ImageUploaderProps>(
id: idCountRef.current++,
status: 'pending',
file,
} as Task)
}) as Task
)

setTasks(prev => [...getFinalTasks(prev), ...newTasks])
Expand Down Expand Up @@ -318,14 +318,14 @@ export const ImageUploader = forwardRef<ImageUploaderRef, ImageUploaderProps>(
)}
{!props.disableUpload && (
<input
aria-label={`${classPrefix}-input`}
ref={inputRef}
capture={props.capture}
accept={props.accept}
multiple={props.multiple}
type='file'
className={`${classPrefix}-input`}
onChange={onChange}
aria-hidden
/>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ exports[`ImageUploader \`preview\` & \`onPreview\` prop 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -239,7 +239,7 @@ exports[`ImageUploader custom upload button 1`] = `
</div>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
class="adm-image-uploader-input"
type="file"
/>
Expand Down Expand Up @@ -445,7 +445,7 @@ exports[`ImageUploader upload status 1`] = `
</span>
<input
accept="image/*"
aria-hidden="true"
aria-label="adm-image-uploader-input"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 label 不要默认填,可以接受 aria-label 属性来让开发者填。prefix 不是给拼label 用的。而且这也会对多语言用户产生困扰~

class="adm-image-uploader-input"
type="file"
/>
Expand Down
Loading