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(a11y): Some accessibility fixes #1576

Merged
merged 4 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-empty-function": 0,
"arrow-body-style": 0,
"jsx-a11y/alt-text": 1,
"jsx-a11y/anchor-is-valid": 1,
"jsx-a11y/aria-activedescendant-has-tabindex": 1,
"jsx-a11y/aria-role": 1,
"jsx-a11y/click-events-have-key-events": 1,
"jsx-a11y/interactive-supports-focus": 1,
"jsx-a11y/no-static-element-interactions": 1,
"jsx-a11y/role-has-required-aria-props": 1,
"curly": 0,
"eol-last": 0,
"eqeqeq": 0,
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class App extends Component<any, any> {
<div id="app" className="lemmy-site">
<button
type="button"
className="btn btn-text skip-link bg-light position-absolute start-0 z-3"
className="btn skip-link bg-light position-absolute start-0 z-3"
onClick={linkEvent(this, this.handleJumpToContent)}
>
{I18NextService.i18n.t("jump_to_content", "Jump to content")}
Expand Down
8 changes: 4 additions & 4 deletions src/shared/components/post/post-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -585,17 +585,17 @@ export class PostForm extends Component<PostFormProps, PostFormState> {

return (
suggestedTitle && (
<div
className="mt-1 text-muted small fw-bold pointer"
role="button"
<button
type="button"
className="mt-1 small border-0 bg-transparent p-0 d-block text-muted fw-bold pointer"
onClick={linkEvent(
{ i: this, suggestedTitle },
copySuggestedTitle
)}
>
{I18NextService.i18n.t("copy_suggested_title", { title: "" })}{" "}
{suggestedTitle}
</div>
</button>
)
);
}
Expand Down
7 changes: 4 additions & 3 deletions src/shared/components/post/post-listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,13 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
</a>
</div>
<div className="my-2 d-block d-sm-none">
<a
className="d-inline-block"
<button
type="button"
className="p-0 border-0 bg-transparent d-inline-block"
onClick={linkEvent(this, this.handleImageExpandClick)}
>
<PictrsImage src={this.imageSrc} />
</a>
</button>
</div>
</>
);
Expand Down
12 changes: 6 additions & 6 deletions src/shared/components/private_message/private-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@ export class PrivateMessage extends Component<
</span>
</li>
<li className="list-inline-item">
<div
role="button"
className="pointer text-monospace"
<button
type="button"
className="pointer text-monospace p-0 bg-transparent border-0 d-block"
onClick={linkEvent(this, this.handleMessageCollapse)}
>
{this.state.collapsed ? (
<Icon icon="plus-square" classes="icon-inline" />
<Icon icon="plus-square" />
) : (
<Icon icon="minus-square" classes="icon-inline" />
<Icon icon="minus-square" />
)}
</div>
</button>
</li>
</ul>
{this.state.showEdit && (
Expand Down