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

Work on accessibility #3

Open
rosswintle opened this issue Nov 28, 2019 · 3 comments
Open

Work on accessibility #3

rosswintle opened this issue Nov 28, 2019 · 3 comments

Comments

@rosswintle
Copy link
Contributor

No description provided.

@rm-code
Copy link

rm-code commented Nov 29, 2019

I would be really interested in using this for one of our projects, but we have pretty strict guidelines for accessibility.

You probably already know, but here are some things off the top of my head:

  • Tabindex for the different option-buttons
  • Focus indicators for buttons (so a user with a keyboard can tell which button they have currently selected)
  • Let user define (optional) Aria-Labels for the buttons... e.g.:
    1: {
        text: 'Hi! Welcome to Peekobot.',
        options: [
            {
                text: '👋',
                aria-label:'Hello there!',
                next: 2

            }
        ]
    },
  • I haven't tested screenreader support yet, but it might need an aria-live region?

Are you looking for help/PRs yet?

@rosswintle
Copy link
Contributor Author

Thanks so much for your interest and suggested additions. I'm happy with the basics of accessibility, but am not so good on accessibility of highly interactive elements, so I do appreciate any help I can get!

It might be a few days before I get around to working on it again. So if you want to try and make a PR then that's great. If not I'll try and look at it next week. I'd love for it to be accessible!

Also, I'm happy to blow the 100-line limit. I'm using "less than 100 lines" in the description right now, but it doesn't have to be. So don't worry about that if you are making a PR.

Thanks again!

@nikas-belogolov
Copy link

if (option.ariaLabel) button.setAttribute("aria-label", option.ariaLabel);

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

No branches or pull requests

3 participants