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

Links with href attributes via hrefBuilder should not have a button role #388

Closed
mattc-cogapp opened this issue Oct 23, 2021 · 1 comment · Fixed by #390
Closed

Links with href attributes via hrefBuilder should not have a button role #388

mattc-cogapp opened this issue Oct 23, 2021 · 1 comment · Fixed by #390
Assignees

Comments

@mattc-cogapp
Copy link

In #211 (related issue: #212), the behaviour of setting a role of button on links with no href attribute was added. However; when using the hrefBuilder prop, any page links will have an href, and should not take on the role of button.

I'm happy to tackle a PR for this, however I just wanted to check the following couple of things:

  • Is this a PR you even want?
  • What would your expected behaviour be?

Initially, my assumption would be that essentially we want something like this (hastily written pseudo-code), where we only assign the role of button if the hrefBuilder prop isn't defined:

role={typeof this.props.hrefBuilder === 'undefined' ? 'button' : null} 
@MonsieurV MonsieurV self-assigned this Oct 25, 2021
@MonsieurV
Copy link
Collaborator

Hi @mattc-cogapp,

If you provide the PR, I'll merge it. Ok with the solution proposed, no need for more complicated I think (like allowing to define a role by props).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants