From: Jay Sitter Date: Sun, 25 Jun 2023 06:27:07 +0000 (-0400) Subject: fix(a11y): Change the look and behavior of some file upload fields X-Git-Url: http://these/git/%7B%60/feeds/all.xml?a=commitdiff_plain;h=dc43c51b0df43294e017f17be71649314ed0d349;p=lemmy-ui.git fix(a11y): Change the look and behavior of some file upload fields --- diff --git a/src/assets/css/main.css b/src/assets/css/main.css index cb4a8b8..dde2a50 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -88,6 +88,15 @@ color: var(--bs-gray) !important; } +input[type="file"]::file-selector-button { + font: inherit; + border: 0; + padding: 0.375em 0.75em; + border-radius: var(--bs-border-radius); + background-color: var(--bs-secondary); + color: var(--bs-white); +} + .icon { display: inline-grid; display: inline-flex; diff --git a/src/shared/components/common/image-upload-form.tsx b/src/shared/components/common/image-upload-form.tsx index e8005cc..107949f 100644 --- a/src/shared/components/common/image-upload-form.tsx +++ b/src/shared/components/common/image-upload-form.tsx @@ -33,38 +33,34 @@ export class ImageUploadForm extends Component< render() { return (
- + {this.props.imageSrc && ( + + {/* TODO: Create "Current Iamge" translation for alt text */} + + + + )} diff --git a/src/shared/components/home/emojis-form.tsx b/src/shared/components/home/emojis-form.tsx index caf8221..930bd55 100644 --- a/src/shared/components/home/emojis-form.tsx +++ b/src/shared/components/home/emojis-form.tsx @@ -87,7 +87,10 @@ export class EmojiForm extends Component { )}
- +
@@ -129,30 +132,30 @@ export class EmojiForm extends Component { /> )} {cv.image_url.length === 0 && ( - - )}
{I18NextService.i18n.t("column_emoji")} diff --git a/src/shared/components/home/site-form.tsx b/src/shared/components/home/site-form.tsx index 382f565..e30d13b 100644 --- a/src/shared/components/home/site-form.tsx +++ b/src/shared/components/home/site-form.tsx @@ -155,28 +155,32 @@ export class SiteForm extends Component { /> -
-