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 14 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
10 changes: 5 additions & 5 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, 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")}` },
{ name: "solid_background", svg: HighLightIcon, textValue: `${__("reader.annotations.type.solid")}` },
{ name: "underline", svg: UnderLineIcon, textValue: `${__("reader.annotations.type.underline")}` },
{ name: "strikethrough", svg: TextStrikeThroughtIcon, textValue: `${__("reader.annotations.type.strikethrough")}` },
{ name: "outline", svg: TextOutlineIcon, textValue: `${__("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}>
Copy link
Member

Choose a reason for hiding this comment

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

This taglist element is rendered as a non semantic div.
Checkboxes with labels would be more appropriate.

{(item) => <Tag id={item.name} className={stylesAnnotations.annotations_filter_drawtype} textValue={item.title}><SVG svg={item.svg} /></Tag>}
{(item) => <Tag id={item.name} className={stylesAnnotations.annotations_filter_drawtype} textValue={item.textValue}><SVG svg={item.svg} /></Tag>}
</TagList>
</details>
</TagGroup>
Expand Down
Loading