Skip to content

Update controls for accessibilty #16

@collinstommy

Description

@collinstommy

svelte-paginate could be more accessible by making a few small changes.

  1. Update the <span class="option"> to be a <button> (remove default styling)
  2. Add aria-selected=true to the button that matches the active page
  3. Add an aria-label to the buttons e.g. Go to page 1
  4. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions