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

Improve Button Examples #10

Open
kaseybon opened this issue Oct 8, 2019 · 4 comments
Open

Improve Button Examples #10

kaseybon opened this issue Oct 8, 2019 · 4 comments
Labels
good first issue Good for newcomers

Comments

@kaseybon
Copy link
Member

kaseybon commented Oct 8, 2019

The Problem:
Currently the only button example in the pattern library demos an anchor tag. This is fine but doesn't represent the full capabilities of the button component.

The Fix:

  1. Update the button component (src/markup/patterns/component/buttons/btn.hbs) to be a button element instead of an anchor tag.
  2. Add a new button link component (src/markup/patterns/component/buttons/btn-link.hbs) that uses an anchor tag. This can be a duplicate of the btn.hbs file as we'll need all of the variants that are in the front matter, just be sure to update the name.
  3. The following documentation should be added to src/markup/patterns/component/buttons/collection.yaml:

    To ensure keyboard accessibility button and anchor elements should be used when appropriate. If clicking the element will take the user to a different location on the page or to a different page, then use an anchor tag. If clicking the element will trigger a Javascript event, then use a button element.

@vinuch
Copy link

vinuch commented Oct 8, 2019

id like to take care of this

@kaseybon
Copy link
Member Author

kaseybon commented Oct 9, 2019

Awesome @vinuch! I've assigned the card to you and I will review your pull request once submitted.

@mahakmakharia
Copy link

Should I try my hand at it too?

@kaseybon
Copy link
Member Author

@mahakmakharia I'm sorry for the very late feedback but if you would like to give this a try you are more than welcome to 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants