Skip to content

Commit 7b61ac2

Browse files
committed
added aria label to help screen reader
1 parent b5e731d commit 7b61ac2

17 files changed

Lines changed: 67 additions & 44 deletions

frontend/src/components/common/table-select.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ const TableSelect = ({ editor }: TableSelectProps) => {
8484
>
8585
<DropdownMenuTrigger asChild>
8686

87-
<Button variant="ghost" className="text-primary-text" type="button">
87+
<Button
88+
aria-label='table-select'
89+
variant="ghost"
90+
className="text-primary-text"
91+
type="button">
8892
<Table /> Table
8993
<ChevronDown />
9094
</Button>

frontend/src/components/common/tiptap-toolbar-button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export function ToolbarButton({
1818
return (
1919
<Button
2020
title={title}
21+
aria-label={title}
2122
disabled={disabled}
2223
data-active-state={active ? 'on' : 'off'}
2324
onClick={onClick}

frontend/src/components/ui/button-loader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ function ButtonLoader({ className, ...props }: React.ComponentProps<"div">) {
66
return (
77
<Button
88
variant="outline"
9+
aria-label='button-loader'
10+
title='button-loader'
911
disabled
1012
className="gap-2 opacity-70"
1113
>

frontend/src/components/ui/input-group.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function InputGroupButton({
105105
VariantProps<typeof inputGroupButtonVariants>) {
106106
return (
107107
<Button
108+
aria-label="input-group"
108109
type={type}
109110
data-size={size}
110111
variant={variant}

frontend/src/feature/quote/dialog/component/copy-image-button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const CopyImageButton = (props: Props) => {
4040
<Button
4141
variant="outline"
4242
size="sm"
43+
aria-label="image-copy"
4344
onClick={async (e) => {
4445
e.preventDefault()
4546
handleImageCopy()

frontend/src/feature/quote/dialog/component/copy-text-button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const CopyTextButton = (props: Props) => {
3131
<div className="flex flex-col gap-2 items-center">
3232
<Button
3333
variant="outline"
34+
aria-label="copy-text"
3435
size="sm"
3536
className={buttonClassName}
3637
onClick={(e) => {

frontend/src/feature/quote/dialog/component/share-button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export const ShareButton = (props: Props) => {
8181
<Button
8282
variant="outline"
8383
size="sm"
84+
aria-label="share"
8485
onClick={async (e) => {
8586
e.preventDefault()
8687
handleShare()

frontend/src/feature/quote/dialog/delete.dialog.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ function DeleteQuoteDialog(props: Props) {
5353
{/* <DialogClose asChild>
5454
<Button variant="outline">Close</Button>
5555
</DialogClose> */}
56-
<Button
57-
type="submit"
58-
onClick={handleFormSubmit}
59-
aria-label="delete"
60-
variant={'destructive'}
56+
<Button
57+
type="submit"
58+
onClick={handleFormSubmit}
59+
aria-label="delete"
60+
variant={'destructive'}
6161
className="">
62-
Delete Quote
62+
Delete
6363
</Button>
6464
</DialogFooter>
6565
</DialogContent>

frontend/src/feature/quote/dialog/setting.dialog.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function SettingComponent(props: Props) {
4747

4848
return (
4949
<Dialog open={open} onOpenChange={setOpen}
50-
50+
5151
>
5252
<DialogTrigger asChild
53-
aria-label="settings-button">
53+
aria-label="settings-button">
5454
<Button
5555
variant="outline"
5656
size="icon"
@@ -60,10 +60,10 @@ function SettingComponent(props: Props) {
6060
</Button>
6161
</DialogTrigger>
6262

63-
<DialogContent
64-
className="p-4 gap-2 max-h-[90vh] overflow-auto"
65-
aria-describedby="Settings"
66-
aria-label="settings">
63+
<DialogContent
64+
className="p-4 gap-2 max-h-[90vh] overflow-auto"
65+
aria-describedby="Settings"
66+
aria-label="settings">
6767
<DialogHeader>
6868
<DialogTitle>Settings</DialogTitle>
6969
<DialogDescription>
@@ -230,5 +230,5 @@ function SettingComponent(props: Props) {
230230
);
231231
}
232232

233-
export default memo(SettingComponent)
233+
export default memo(SettingComponent)
234234

frontend/src/feature/quote/dialog/share.dialog.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ export function ShareBackground(props: Props) {
6262
return (
6363
<Dialog open={open} onOpenChange={setOpen}>
6464
<DialogTrigger asChild>
65-
<Button variant="outline" size="icon"
65+
<Button
66+
variant="outline"
67+
size="icon"
68+
aria-label="share"
6669
className={
6770
cn(
6871
open ? "text-primary" : ""

0 commit comments

Comments
 (0)