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 accessibility #2705

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions src/renderer/reader/components/ReaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -848,10 +848,10 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU
// });

const selectDrawtypesOptions = [
{ name: "solid_background", svg: HighLightIcon },
{ name: "underline", svg: UnderLineIcon },
{ name: "strikethrough", svg: TextStrikeThroughtIcon },
{ name: "outline", svg: TextOutlineIcon },
{ name: "solid_background", svg: HighLightIcon, title: `${__("reader.annotations.type.solid")}` },
{ name: "underline", svg: UnderLineIcon, title: `${__("reader.annotations.type.underline")}` },
{ name: "strikethrough", svg: TextStrikeThroughtIcon, title: `${__("reader.annotations.type.strikethrough")}` },
{ name: "outline", svg: TextOutlineIcon, title: `${__("reader.annotations.type.outline")}` },
];

const nbOfFilters = ((tagArrayFilter === "all") ?
Expand Down Expand Up @@ -1043,7 +1043,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU
</div>
</summary>
<TagList items={selectDrawtypesOptions} className={stylesAnnotations.annotations_filter_taglist}>
{(item) => <Tag id={item.name} className={stylesAnnotations.annotations_filter_drawtype} textValue={item.name}><SVG svg={item.svg} /></Tag>}
{(item) => <Tag id={item.name} className={stylesAnnotations.annotations_filter_drawtype} textValue={item.title}><SVG svg={item.svg} /></Tag>}
Copy link
Member

Choose a reason for hiding this comment

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

I undesrtand that title: ${__("reader.annotations.type.strikethrough")} }, is not referint to the HTML title argument, but used as a text value for an argument rendered as aria-label.

Therefore, it should have a different name to avoid confusion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to "textValue"

</TagList>
</details>
</TagGroup>
Expand Down Expand Up @@ -1158,7 +1158,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU
</Popover.Portal>
</Popover.Root>
<AlertDialog.Root>
<AlertDialog.Trigger className={stylesAnnotations.annotations_filter_trigger_button} disabled={!annotationListFiltered.length}>
<AlertDialog.Trigger className={stylesAnnotations.annotations_filter_trigger_button} disabled={!annotationListFiltered.length} title={__("dialog.deleteAnnotations")}>
<SVG svg={TrashIcon} ariaHidden />
</AlertDialog.Trigger>
<AlertDialog.Portal>
Expand Down
Loading