mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
fix(a11y): Change divs and links to buttons
This commit is contained in:
parent
7aa2860bd6
commit
0cc354b264
3 changed files with 14 additions and 13 deletions
|
@ -585,9 +585,9 @@ 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
|
||||
|
@ -595,7 +595,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
|||
>
|
||||
{I18NextService.i18n.t("copy_suggested_title", { title: "" })}{" "}
|
||||
{suggestedTitle}
|
||||
</div>
|
||||
</button>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
</>
|
||||
);
|
||||
|
|
|
@ -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 btn p-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 && (
|
||||
|
|
Loading…
Reference in a new issue