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:
- Update the button component (
src/markup/patterns/component/buttons/btn.hbs) to be a button element instead of an anchor tag.
- 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.
- 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.
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:
src/markup/patterns/component/buttons/btn.hbs) to be abuttonelement instead of an anchor tag.src/markup/patterns/component/buttons/btn-link.hbs) that uses an anchor tag. This can be a duplicate of thebtn.hbsfile as we'll need all of the variants that are in the front matter, just be sure to update the name.src/markup/patterns/component/buttons/collection.yaml: