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

Add missing a11y attributes to "Mark as read" button on DiscussionListItem #2564

Merged
merged 1 commit into from
Jan 24, 2021
Merged

Conversation

davwheat
Copy link
Member

@davwheat davwheat commented Jan 24, 2021

Changes proposed in this pull request:
This PR adds missing accessibility attributes to the "Mark as read" button on DiscussionListItem.

<span>s are inherently inaccessible to keyboard users and unfocusable. Using an onClick on them without any other attributes indicating that this performs an action is bad practice as it means keyboard navigators and screen-readers cannot access the elements, so never know that the buttons exist.

Assigning unfocusable elements with a tabindex="0" allow them to be focuses, and role="button" lets screen-readers know that it is a button-like element.

Reviewers should focus on:

Other locations where issues like this may be present: they may be able to be bundled into one whole PR.

Screenshot

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test). (N/A)

@askvortsov1 askvortsov1 merged commit 14dc46e into flarum:master Jan 24, 2021
@askvortsov1 askvortsov1 added this to the 0.1.0-beta.16 milestone Jan 24, 2021
@davwheat davwheat deleted the patch-2 branch March 5, 2021 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants