mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
🗑️ a11y: Add Accessible Name to Button for File Attachment Removal (#6709)
This commit is contained in:
parent
c4f1da26b3
commit
95ecd05046
2 changed files with 6 additions and 1 deletions
|
|
@ -1,11 +1,15 @@
|
||||||
|
import { useLocalize } from '~/hooks';
|
||||||
|
|
||||||
export default function RemoveFile({ onRemove }: { onRemove: () => void }) {
|
export default function RemoveFile({ onRemove }: { onRemove: () => void }) {
|
||||||
|
const localize = useLocalize();
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="absolute right-1 top-1 -translate-y-1/2 translate-x-1/2 rounded-full bg-surface-secondary p-0.5 transition-colors duration-200 hover:bg-surface-primary"
|
className="absolute right-1 top-1 -translate-y-1/2 translate-x-1/2 rounded-full bg-surface-secondary p-0.5 transition-colors duration-200 hover:bg-surface-primary"
|
||||||
onClick={onRemove}
|
onClick={onRemove}
|
||||||
|
aria-label={localize('com_ui_attach_remove')}
|
||||||
>
|
>
|
||||||
<span>
|
<span aria-hidden="true">
|
||||||
<svg
|
<svg
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
fill="none"
|
fill="none"
|
||||||
|
|
|
||||||
|
|
@ -509,6 +509,7 @@
|
||||||
"com_ui_attach_error_openai": "Cannot attach Assistant files to other endpoints",
|
"com_ui_attach_error_openai": "Cannot attach Assistant files to other endpoints",
|
||||||
"com_ui_attach_error_size": "File size limit exceeded for endpoint:",
|
"com_ui_attach_error_size": "File size limit exceeded for endpoint:",
|
||||||
"com_ui_attach_error_type": "Unsupported file type for endpoint:",
|
"com_ui_attach_error_type": "Unsupported file type for endpoint:",
|
||||||
|
"com_ui_attach_remove": "Remove file",
|
||||||
"com_ui_attach_warn_endpoint": "Non-Assistant files may be ignored without a compatible tool",
|
"com_ui_attach_warn_endpoint": "Non-Assistant files may be ignored without a compatible tool",
|
||||||
"com_ui_attachment": "Attachment",
|
"com_ui_attachment": "Attachment",
|
||||||
"com_ui_auth_type": "Auth Type",
|
"com_ui_auth_type": "Auth Type",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue