refactor: add DrawerDescription to ImageGenDrawer and ImageUploadDrawer for improved accessibility
This commit is contained in:
@@ -5,6 +5,7 @@ import { Tr } from "@/translate";
|
|||||||
import {
|
import {
|
||||||
Drawer,
|
Drawer,
|
||||||
DrawerContent,
|
DrawerContent,
|
||||||
|
DrawerDescription,
|
||||||
DrawerFooter,
|
DrawerFooter,
|
||||||
DrawerHeader,
|
DrawerHeader,
|
||||||
DrawerTitle,
|
DrawerTitle,
|
||||||
@@ -55,6 +56,9 @@ export function ImageGenDrawer({ disableFactor }: Props) {
|
|||||||
<span className="sr-only">Generate Image</span>
|
<span className="sr-only">Generate Image</span>
|
||||||
</Button>
|
</Button>
|
||||||
</DrawerTrigger>
|
</DrawerTrigger>
|
||||||
|
<DrawerDescription className="sr-only">
|
||||||
|
Generate images using the DALL-E model.
|
||||||
|
</DrawerDescription>
|
||||||
<DrawerContent>
|
<DrawerContent>
|
||||||
<div className="mx-auto w-full max-w-lg">
|
<div className="mx-auto w-full max-w-lg">
|
||||||
<DrawerHeader>
|
<DrawerHeader>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Tr } from "@/translate";
|
|||||||
import {
|
import {
|
||||||
Drawer,
|
Drawer,
|
||||||
DrawerContent,
|
DrawerContent,
|
||||||
|
DrawerDescription,
|
||||||
DrawerFooter,
|
DrawerFooter,
|
||||||
DrawerHeader,
|
DrawerHeader,
|
||||||
DrawerTitle,
|
DrawerTitle,
|
||||||
@@ -29,7 +30,7 @@ export function ImageUploadDrawer({ setImages, images, disableFactor }: Props) {
|
|||||||
useState("b64_json");
|
useState("b64_json");
|
||||||
return (
|
return (
|
||||||
<Drawer open={showAddImage} onOpenChange={setShowAddImage}>
|
<Drawer open={showAddImage} onOpenChange={setShowAddImage}>
|
||||||
<DrawerTrigger>
|
<DrawerTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
@@ -40,6 +41,9 @@ export function ImageUploadDrawer({ setImages, images, disableFactor }: Props) {
|
|||||||
<span className="sr-only">Add Image</span>
|
<span className="sr-only">Add Image</span>
|
||||||
</Button>
|
</Button>
|
||||||
</DrawerTrigger>
|
</DrawerTrigger>
|
||||||
|
<DrawerDescription className="sr-only">
|
||||||
|
Add images to the chat.
|
||||||
|
</DrawerDescription>
|
||||||
<DrawerContent>
|
<DrawerContent>
|
||||||
<div className="mx-auto w-full max-w-lg">
|
<div className="mx-auto w-full max-w-lg">
|
||||||
<DrawerHeader>
|
<DrawerHeader>
|
||||||
|
|||||||
Reference in New Issue
Block a user