svelte-paginate
svelte-paginate copied to clipboard
Update controls for accessibilty
svelte-paginate
could be more accessible by making a few small changes.
- Update the
<span class="option">
to be a<button>
(remove default styling) - Add
aria-selected=true
to the button that matches the active page - Add an
aria-label
to the buttons e.g.Go to page 1
- Add a role and label to the container:
<nav role="navigation" aria-label="Items Navigation">
3 & 4 could be passed in as props.
@TahaSh I can create a PR if you agree with these proposed changes?
For context, I use svelte-paginate
on my site: http://aoelibrary.com/. I'm doing some work to make it accessible at the moment.
Repo: https://github.com/collinstommy/aoe-library
Thanks for making this package. It saved me a lot of work!