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

markdown - buttons use the button role incorrectly #486

Open
evant opened this issue Feb 13, 2025 · 0 comments
Open

markdown - buttons use the button role incorrectly #486

evant opened this issue Feb 13, 2025 · 0 comments
Labels
docs nuemark Related to nuemark package

Comments

@evant
Copy link

evant commented Feb 13, 2025

Describe the Bug

Reading the documentation on buttons and it says it generates the following html (also verified this is true)

<a role="button" href="/docs/">Learn more</a>

This is not how the button role should be used. The general rule of thumb is that links navigate, buttons perform an action. This example navigates so it should be a link. This cause 2 problems:

  1. It misleads the user on what will happen if when they click it.
  2. It doesn't behavior properly without additional work. For example users expect buttons to active when you press space which this does not.

I think simply removing the role would be sufficient? Though you may want to rethink having buttons take an href option at all depending on what you want them to mean.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role
https://www.washington.edu/accesstech/checklist/links-buttons/

@evant evant added the bug label Feb 13, 2025
@nobkd nobkd added docs nuemark Related to nuemark package labels Feb 13, 2025
@nobkd nobkd removed the bug label Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs nuemark Related to nuemark package
Projects
None yet
Development

No branches or pull requests

2 participants