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

Remove role="link" from anchor tags #52

Open
MattWilsonMD opened this issue Jul 27, 2021 · 4 comments
Open

Remove role="link" from anchor tags #52

MattWilsonMD opened this issue Jul 27, 2021 · 4 comments

Comments

@MattWilsonMD
Copy link

The "ARIA support" option in the settings is useful, but I would advise you to remove the function that adds role="link" to <a> tags. I advise this for two reasons:

  1. Screen readers already know that an tag is a link because of HTML semantics.
  2. Sometimes components such as a tabbed interface use an tag as a tab so we need it to say role="tab" to avoid confusion/conflicts.
@nighswon
Copy link

nighswon commented Feb 1, 2022

Supporting this! It gets flagged in our ADA review of Divi sites all the time.

@joelhsmith
Copy link

Same. The attribute is redundant.

@mrwweb
Copy link

mrwweb commented Oct 14, 2022

This may be a slightly different issue, but I'll leave it as a comment for now. Yesterday I found a social icon link in the footer with role="button". The ARIA roles seem off enough that I've had to turn off the setting that adds them.

@eartahhj
Copy link

I don't know exactly what has happened in the time, but since this issue has been opened on July 2021, and after that:

  • on version 2.0.2 released on April 2022 the role="link" has apparently been added on links
  • and since this is discouraged by MDN docs: ARIA: link role

Here:
Note: Where possible, it is recommended that you use a native [<a>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) element rather than the link role, as native elements are more widely supported by user agents and assistive technology. Native [<a>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) elements also support keyboard and focus requirements by default, without need for additional customization.

I advise to remove role="link" from <a> tags since it is clearly redundant. Unfortunately, I see this very often around the web, for example in <main role="main"> or <nav role="navigation"> and I don't see why it would need to be specified two times.

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

5 participants