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

Keyboard Accessibility Pagination Component #963

Merged
merged 18 commits into from
Feb 3, 2022
Merged

Conversation

mr-gabe49
Copy link
Member

@mr-gabe49 mr-gabe49 commented Jan 10, 2022

Related to #292

Technical details

  • This PR adds keyboard accessibility to pagination component
  • Adds an aria-label prop to the component
  • Adds a small hover effect
  • Disables options that can't be clicked

Screenshots

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the master branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@seancolsen
Copy link
Contributor

I'm going to let @pavish take this one since he already expressed some opinions and I have not formed any opinions about it.

@pavish
Copy link
Member

pavish commented Jan 13, 2022

@mr-gabe49 I think you could remove the hovered state implementation (hoverIndex and hover class) and the left, right arrow handling.

I've added a comment on the issue: #292 (comment)

This gives a general set of guidelines to follow to add accessibility for the pagination component. I believe points 2, 3 and 4 need to be handled.

Let me know if the comment answers your questions.

@mr-gabe49 mr-gabe49 changed the title Keyboard pagination292 Keyboard Accessibility Pagination Component Jan 20, 2022
@mr-gabe49 mr-gabe49 marked this pull request as ready for review January 20, 2022 16:57
@mr-gabe49 mr-gabe49 requested a review from a team January 20, 2022 16:57
@mr-gabe49
Copy link
Member Author

@pavish Regarding point 4 from your 292 Comment, point 3 of Accessibility Matters seems to suggest that aria-selected and aria-current could be used interchangeably depending on the presence of the role attribute.

@pavish pavish self-assigned this Jan 20, 2022
@pavish pavish added the pr-status: review A PR awaiting review label Jan 20, 2022
@pavish pavish requested a review from a team February 2, 2022 08:45
Copy link
Member

@pavish pavish left a comment

Choose a reason for hiding this comment

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

@mr-gabe49 The PR looks pretty good.

I have a couple questions. Once resolved, we can merge this PR.

@pavish pavish added pr-status: revision A PR awaiting follow-up work from its author after review and removed pr-status: review A PR awaiting review labels Feb 2, 2022
@seancolsen seancolsen removed their request for review February 2, 2022 16:39
@mr-gabe49 mr-gabe49 requested a review from pavish February 2, 2022 17:07
@silentninja silentninja added pr-status: review A PR awaiting review and removed pr-status: revision A PR awaiting follow-up work from its author after review labels Feb 2, 2022
@mr-gabe49 mr-gabe49 added pr-status: revision A PR awaiting follow-up work from its author after review and removed pr-status: review A PR awaiting review labels Feb 2, 2022
@mr-gabe49 mr-gabe49 added pr-status: review A PR awaiting review and removed pr-status: revision A PR awaiting follow-up work from its author after review labels Feb 2, 2022
@pavish pavish enabled auto-merge February 3, 2022 03:29
@codecov-commenter
Copy link

Codecov Report

Merging #963 (2bf712a) into master (224d488) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #963   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files          95       95           
  Lines        3463     3463           
=======================================
  Hits         3230     3230           
  Misses        233      233           
Flag Coverage Δ
pytest-backend 93.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1900452...2bf712a. Read the comment docs.

@pavish pavish merged commit d1bb077 into master Feb 3, 2022
@pavish pavish deleted the keyboard_pagination292 branch February 3, 2022 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants